From: Ulrich Drepper Date: Fri, 24 Oct 2003 03:22:26 +0000 (+0000) Subject: (__hash_string): Zero-extend each char from the string; the old code did a sign-exten... X-Git-Tag: cvs/glibc-2_3_3~110 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d0f1175e9440779ee112ab10c089a24736144384;p=thirdparty%2Fglibc.git (__hash_string): Zero-extend each char from the string; the old code did a sign-extend on some platforms. --- diff --git a/intl/hash-string.c b/intl/hash-string.c index e4b0f8fe57b..465456f4b58 100644 --- a/intl/hash-string.c +++ b/intl/hash-string.c @@ -35,7 +35,7 @@ __hash_string (str_param) while (*str != '\0') { hval <<= 4; - hval += (unsigned long int) *str++; + hval += (unsigned char) *str++; g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4)); if (g != 0) {