unsigned char hashes (Re: perl@16539)
Nicholas Clark [Sat, 11 May 2002 17:54:44 +0000 (18:54 +0100)]
Message-ID: <20020511165444.GD301@Bagpuss.unfortu.net>

Be explicitly unsigned char in the hash calculation.

p4raw-id: //depot/perl@16542

hv.h

diff --git a/hv.h b/hv.h
index 6dc0a88..4979fdd 100644 (file)
--- a/hv.h
+++ b/hv.h
@@ -52,7 +52,7 @@ struct xpvhv {
 /* (http://burtleburtle.net/bob/hash/doobs.html) */
 #define PERL_HASH(hash,str,len) \
      STMT_START        { \
-       register const char *s_PeRlHaSh = str; \
+       register const unsigned char *s_PeRlHaSh = str; \
        register I32 i_PeRlHaSh = len; \
        register U32 hash_PeRlHaSh = 0; \
        while (i_PeRlHaSh--) { \