From 260eab8e44f3b8c673595f91d182381c78c9336d Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Tue, 31 Jul 2012 20:41:19 +0200 Subject: [PATCH] Fixed problems in strncmp(3) and strncasecmp(3). This was introduced during the recent refactoring. --- libmaxsi/strncasecmp.cpp | 2 +- libmaxsi/strncmp.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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' )