diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-10-24 03:22:26 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-10-24 03:22:26 +0000 |
commit | d0f1175e9440779ee112ab10c089a24736144384 (patch) | |
tree | 1738e23c8fd06c021b9287235d5b6f471ed27e87 /intl/hash-string.c | |
parent | e97bfee1b19df345743ce6b102f044d39766407d (diff) | |
download | glibc-d0f1175e9440779ee112ab10c089a24736144384.tar glibc-d0f1175e9440779ee112ab10c089a24736144384.tar.gz glibc-d0f1175e9440779ee112ab10c089a24736144384.tar.bz2 glibc-d0f1175e9440779ee112ab10c089a24736144384.zip |
(__hash_string): Zero-extend each char from the string; the old code did a sign-extend on some platforms.
Diffstat (limited to 'intl/hash-string.c')
-rw-r--r-- | intl/hash-string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intl/hash-string.c b/intl/hash-string.c index e4b0f8fe57..465456f4b5 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) { |