diff --git a/reactos/lib/kernel32/mem/isbad.c b/reactos/lib/kernel32/mem/isbad.c index d42d6253740..dabbf98022e 100644 --- a/reactos/lib/kernel32/mem/isbad.c +++ b/reactos/lib/kernel32/mem/isbad.c @@ -21,7 +21,7 @@ wcsnlen ( ) { UINT i = 0; - while( lpsz[i] && i < ucchMax ) i++; + while( i < ucchMax && lpsz[i] ) i++; return i; } @@ -37,7 +37,7 @@ strnlen ( ) { UINT i = 0; - while( lpsz[i] && i < uiMax ) i++; + while( i < uiMax && lpsz[i] ) i++; return i; }