summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 18f1240bbd..58560bd227 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -953,10 +953,11 @@ int StrnCaseCmp(char *s, char *t, int n)
else
#endif /* KANJI_WIN95_COMPATIBILITY */
{
- while (n-- && *s && *t && toupper(*s) == toupper(*t))
+ while (n && *s && *t && toupper(*s) == toupper(*t))
{
s++;
t++;
+ n--;
}
/* not run out of chars - strings are different lengths */