ruby-changes:45918
From: nobu <ko1@a...>
Date: Thu, 16 Mar 2017 15:51:31 +0900 (JST)
Subject: [ruby-changes:45918] nobu:r57991 (trunk): rational.c: initialize n
nobu 2017-03-16 15:51:24 +0900 (Thu, 16 Mar 2017) New Revision: 57991 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57991 Log: rational.c: initialize n * rational.c (read_num): `n` was used uninitialized when the string started with a period. Modified files: trunk/rational.c Index: rational.c =================================================================== --- rational.c (revision 57990) +++ rational.c (revision 57991) @@ -2280,7 +2280,7 @@ islettere(int c) https://github.com/ruby/ruby/blob/trunk/rational.c#L2280 static int read_num(const char **s, const char *const end, VALUE *num, VALUE *div) { - VALUE fp = ONE, exp, fn = ZERO, n; + VALUE fp = ONE, exp, fn = ZERO, n = ZERO; int expsign = 0, ok = 0; char *e; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/