[前][次][番号順一覧][スレッド一覧]

ruby-changes:29118

From: akr <ko1@a...>
Date: Sat, 8 Jun 2013 17:16:29 +0900 (JST)
Subject: [ruby-changes:29118] akr:r41170 (trunk): * random.c (make_seed_value): Fix the length given for

akr	2013-06-08 17:15:51 +0900 (Sat, 08 Jun 2013)

  New Revision: 41170

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41170

  Log:
    * random.c (make_seed_value): Fix the length given for
      rb_integer_unpack.

  Modified files:
    trunk/ChangeLog
    trunk/random.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41169)
+++ ChangeLog	(revision 41170)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Jun  8 17:15:18 2013  Tanaka Akira  <akr@f...>
+
+	* random.c (make_seed_value): Fix the length given for
+	  rb_integer_unpack.
+
 Sat Jun  8 16:38:02 2013  Tanaka Akira  <akr@f...>
 
 	* bignum.c (rb_integer_unpack): Don't use rb_funcall if possible.
Index: random.c
===================================================================
--- random.c	(revision 41169)
+++ random.c	(revision 41170)
@@ -517,7 +517,7 @@ make_seed_value(const uint32_t *ptr) https://github.com/ruby/ruby/blob/trunk/random.c#L517
         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;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]