summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1997-12-20 05:25:37 +0000
committerJeremy Allison <jra@samba.org>1997-12-20 05:25:37 +0000
commit42e0d9a1f0b635076ecfc5823217662dc4a39d22 (patch)
tree954038ed4cc19eab04a382691509d1dd0a1ed283 /source3/lib/util.c
parentb88f43dfdbabbc265ab5a394332df23826860154 (diff)
downloadsamba-42e0d9a1f0b635076ecfc5823217662dc4a39d22.tar.gz
samba-42e0d9a1f0b635076ecfc5823217662dc4a39d22.tar.bz2
samba-42e0d9a1f0b635076ecfc5823217662dc4a39d22.zip
trans2.c: Forced trans2_findfirst to behave as NT does in error returns.
util.c: Applied fix from Branko Cibej <branko.cibej@hermes.si> where StrnCaseCmp tests one character too many. Jeremy. (This used to be commit cb771b2667070cff8d6cf86998a11ba2e4977690)
Diffstat (limited to 'source3/lib/util.c')
-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 */