diff --git a/libmaxsi/strncasecmp.cpp b/libmaxsi/strncasecmp.cpp index 3073f9f9..f75b109e 100644 --- a/libmaxsi/strncasecmp.cpp +++ b/libmaxsi/strncasecmp.cpp @@ -27,7 +27,7 @@ extern "C" int strncasecmp(const char* a, const char* b, size_t maxcount) { - while ( --maxcount ) + while ( maxcount-- ) { char ac = tolower(*a++), bc = tolower(*b++); if ( ac == '\0' && bc == '\0' ) diff --git a/libmaxsi/strncmp.cpp b/libmaxsi/strncmp.cpp index 120edcc6..2494d990 100644 --- a/libmaxsi/strncmp.cpp +++ b/libmaxsi/strncmp.cpp @@ -26,7 +26,7 @@ extern "C" int strncmp(const char* a, const char* b, size_t maxcount) { - while ( --maxcount ) + while ( maxcount-- ) { char ac = *a++, bc = *b++; if ( ac == '\0' && bc == '\0' )