diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-16 06:51:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-16 06:51:24 +0000 |
commit | 58186b9cb031bd74ead151ad6d8afd951c35a763 (patch) | |
tree | 7c956bbbc20d4a7eea1da7f9f4ee64965a39381a /rational.c | |
parent | 1ad6c05343f684bb5af49e2da8c7d04bdb60262f (diff) | |
download | ruby-58186b9cb031bd74ead151ad6d8afd951c35a763.tar.gz |
rational.c: initialize n
* rational.c (read_num): `n` was used uninitialized when the
string started with a period.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r-- | rational.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rational.c b/rational.c index 43c49350f6..cefdfecdbf 100644 --- a/rational.c +++ b/rational.c @@ -2280,7 +2280,7 @@ islettere(int c) 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; |