about summary refs log tree commit diff
path: root/intl/hash-string.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-10-24 03:22:26 +0000
committerUlrich Drepper <drepper@redhat.com>2003-10-24 03:22:26 +0000
commitd0f1175e9440779ee112ab10c089a24736144384 (patch)
tree1738e23c8fd06c021b9287235d5b6f471ed27e87 /intl/hash-string.c
parente97bfee1b19df345743ce6b102f044d39766407d (diff)
downloadglibc-d0f1175e9440779ee112ab10c089a24736144384.tar.gz
glibc-d0f1175e9440779ee112ab10c089a24736144384.tar.xz
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.c2
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)
 	{