Fix for bug #922. Fast path not called for strlower_m() and strupper_m().
authorJeremy Allison <jra@samba.org>
Wed, 7 Jan 2004 23:21:25 +0000 (23:21 +0000)
committerJeremy Allison <jra@samba.org>
Wed, 7 Jan 2004 23:21:25 +0000 (23:21 +0000)
From ab@samba.org (Alexander Bokovoy).
Jeremy.

source/lib/util_str.c

index fd339370b38214c1c7e7cf497cb65415637f3069..f552b38e67c0013daf8df0d35049f15ed68278db 100644 (file)
@@ -1298,7 +1298,7 @@ void strlower_m(char *s)
           supported multi-byte character sets are ascii-compatible
           (ie. they match for the first 128 chars) */
 
-       while (*s && !(((unsigned char)s[0]) & 0x7F)) {
+       while (*s && !(((unsigned char)s[0]) & 0x80)) {
                *s = tolower((unsigned char)*s);
                s++;
        }
@@ -1322,7 +1322,7 @@ void strupper_m(char *s)
           supported multi-byte character sets are ascii-compatible
           (ie. they match for the first 128 chars) */
 
-       while (*s && !(((unsigned char)s[0]) & 0x7F)) {
+       while (*s && !(((unsigned char)s[0]) & 0x80)) {
                *s = toupper((unsigned char)*s);
                s++;
        }