summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;