From 8253094f39f3daf6745bb6271816039b93a2afd1 Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 28 Jun 2007 09:59:47 +0000 Subject: [PATCH] * bignum.c (rb_big_hash): fix hash area. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ bignum.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b8245b8c57..72e04f8892 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Jun 28 18:53:01 2007 Tanaka Akira + + * bignum.c (rb_big_hash): fix hash area. + Thu Jun 28 15:00:06 2007 Nobuyoshi Nakada * ext/stringio/stringio.c (strio_getline): local variable to be diff --git a/bignum.c b/bignum.c index 138e336724..d62dc2ffc6 100644 --- a/bignum.c +++ b/bignum.c @@ -2029,7 +2029,7 @@ rb_big_hash(VALUE x) { int hash; - hash = rb_memhash(BDIGITS(x), BITSPERDIG*RBIGNUM(x)->len) ^ RBIGNUM(x)->sign; + hash = rb_memhash(BDIGITS(x), sizeof(*BDIGITS(x))*RBIGNUM(x)->len) ^ RBIGNUM(x)->sign; return INT2FIX(hash); }