summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-08 08:15:51 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-08 08:15:51 +0000
commit483cbff8dc9abb278c5feb038d98861dcaaefa45 (patch)
treee20bcc56bfaa3f3edc8bc13c03265560dd33814d
parentd35616e69456305c78fd72c35aaf6a1beefc49f1 (diff)
* random.c (make_seed_value): Fix the length given for
rb_integer_unpack. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--random.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 037a8d8..fa9b856 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Jun 8 17:15:18 2013 Tanaka Akira <akr@fsij.org>
+
+ * random.c (make_seed_value): Fix the length given for
+ rb_integer_unpack.
+
Sat Jun 8 16:38:02 2013 Tanaka Akira <akr@fsij.org>
* bignum.c (rb_integer_unpack): Don't use rb_funcall if possible.
diff --git a/random.c b/random.c
index 03b8235..797d49c 100644
--- a/random.c
+++ b/random.c
@@ -517,7 +517,7 @@ make_seed_value(const uint32_t *ptr)
len = DEFAULT_SEED_CNT;
}
- seed = rb_integer_unpack(+1, ptr, DEFAULT_SEED_CNT, sizeof(uint32_t), 0,
+ seed = rb_integer_unpack(+1, ptr, len, sizeof(uint32_t), 0,
INTEGER_PACK_LSWORD_FIRST|INTEGER_PACK_NATIVE_BYTE_ORDER);
return seed;