]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(__hash_string): Zero-extend each char from the string; the old code did a sign-exten...
authorUlrich Drepper <drepper@redhat.com>
Fri, 24 Oct 2003 03:22:26 +0000 (03:22 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 24 Oct 2003 03:22:26 +0000 (03:22 +0000)
intl/hash-string.c

index e4b0f8fe57b49a0c55413eaabbf62b29c80e60ad..465456f4b58088548fa9a9ad1176a393c92dd7c8 100644 (file)
@@ -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)
        {