summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--string.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 208e54e674..0e24751b22 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,6 @@
-Sat Sep 26 16:26:44 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Sep 26 16:32:01 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * string.c (rb_hash_start): fixed shift width on 128bit platform.
* include/ruby/intern.h (rb_hash_{start,uint32,uint,end}): fixed
prototypes.
diff --git a/string.c b/string.c
index ef826d8594..8d06843dce 100644
--- a/string.c
+++ b/string.c
@@ -2206,15 +2206,15 @@ rb_hash_start(st_index_t h)
if (!hashseed_init) {
hashseed = rb_genrand_int32();
#if SIZEOF_VALUE*CHAR_BIT > 4*8
- hashseed <<= 4*8;
+ hashseed <<= 32;
hashseed |= rb_genrand_int32();
#endif
#if SIZEOF_VALUE*CHAR_BIT > 8*8
- hashseed <<= 8*8;
+ hashseed <<= 32;
hashseed |= rb_genrand_int32();
#endif
#if SIZEOF_VALUE*CHAR_BIT > 12*8
- hashseed <<= 12*8;
+ hashseed <<= 32;
hashseed |= rb_genrand_int32();
#endif
hashseed_init = 1;