diff --git a/Gameleap/code/mw4/Code/MW4/CRIOMAIN.CPP b/Gameleap/code/mw4/Code/MW4/CRIOMAIN.CPP index d2d2bc96..8d28cf0f 100644 --- a/Gameleap/code/mw4/Code/MW4/CRIOMAIN.CPP +++ b/Gameleap/code/mw4/Code/MW4/CRIOMAIN.CPP @@ -1008,8 +1008,10 @@ DWORD FAR PASCAL CommWatchProc( LPSTR lpData ) { DWORD effectiveBaud = (g_dwRIOBaud != 0) ? g_dwRIOBaud : ((g_nRIOType == 0) ? 9600UL : 115200UL); - g_dwRIOPollTimeout = min(50UL, max(5UL, - (480000UL + effectiveBaud - 1) / effectiveBaud)); + { + DWORD t = (480000UL + effectiveBaud - 1) / effectiveBaud; + g_dwRIOPollTimeout = (t < 5UL) ? 5UL : (t > 50UL ? 50UL : t); + } } while(1) { DWORD dwEvtMask = 0;