mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-25 02:02:09 +03: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:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user