mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-12 14:21:18 +08:00
(__hash_string): Zero-extend each char from the string; the old code did a sign-extend on some platforms.
This commit is contained in:
parent
e97bfee1b1
commit
d0f1175e94
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user