From c2e747ed00587cd1942ac11f4e9469481e83f205 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sun, 21 Aug 2005 15:51:57 +0000 Subject: [PATCH] Fix implementation of wcsnlen and strnlen. svn path=/trunk/; revision=17464 --- reactos/lib/kernel32/mem/isbad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }