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:36 +0000 (23:21 +0000)
committerJeremy Allison <jra@samba.org>
Wed, 7 Jan 2004 23:21:36 +0000 (23:21 +0000)
From ab@samba.org (Alexander Bokovoy).
Jeremy.

source/lib/util_str.c

index f9923bd325537a726e889856b486a0f0b99fc2d8..d93f39696f4862234b1ff9a4313f40cf83310a56 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++;
        }