1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-16 20:23:50 +03:00

r2454: fixed the accelerated StrCaseCmp() so it compares in the right order

This commit is contained in:
Andrew Tridgell
2004-09-21 01:42:04 +00:00
committed by Gerald (Jerry) Carter
parent fba1637710
commit 4b795cbf12

View File

@@ -148,14 +148,14 @@ int StrCaseCmp(const char *s1, const char *s2)
char u1 = toupper(*s1);
char u2 = toupper(*s2);
if (u1 != u2) {
return u2 - u1;
return u1 - u2;
}
s1++;
s2++;
}
if (*s1 == 0 || *s2 == 0) {
return *s2 - *s1;
return *s1 - *s2;
}
return StrCaseCmp_slow(s1, s2);