diff options
Diffstat (limited to 'source4/lib/util_str.c')
-rw-r--r-- | source4/lib/util_str.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/util_str.c b/source4/lib/util_str.c index 6da0063c50..b46787e3ea 100644 --- a/source4/lib/util_str.c +++ b/source4/lib/util_str.c @@ -796,7 +796,7 @@ void strlower_m(char *s) fast. We optimise for the ascii case, knowing that all our supported multi-byte character sets are ascii-compatible (ie. they match for the first 128 chars) */ - while (*s && !(((uint8_t)s[0]) & 0x7F)) { + while (*s && !(((uint8_t)*s) & 0x80)) { *s = tolower((uint8_t)*s); s++; } @@ -832,7 +832,7 @@ void strupper_m(char *s) fast. We optimise for the ascii case, knowing that all our supported multi-byte character sets are ascii-compatible (ie. they match for the first 128 chars) */ - while (*s && !(((uint8_t)s[0]) & 0x7F)) { + while (*s && !(((uint8_t)*s) & 0x80)) { *s = toupper((uint8_t)*s); s++; } @@ -870,7 +870,7 @@ size_t strlen_m(const char *s) return 0; } - while (*s && !(((uint8_t)s[0]) & 0x7F)) { + while (*s && !(((uint8_t)*s) & 0x80)) { s++; count++; } |