blob: 4cb9503a93f4beb8e2306383f0a794a096bf0567 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
--- a/base/strings/char_traits.h
+++ b/base/strings/char_traits.h
@@ -67,9 +67,9 @@
return __builtin_memcmp(s1, s2, n);
#else
for (; n; --n, ++s1, ++s2) {
- if (*s1 < *s2)
+ if ((unsigned char)*s1 < (unsigned char)*s2)
return -1;
- if (*s1 > *s2)
+ if ((unsigned char)*s1 > (unsigned char)*s2)
return 1;
}
return 0;
|