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 | f8d01bcb5729665acb32b0402b6781109b93d20f (patch) | |
tree | 7c956bbbc20d4a7eea1da7f9f4ee64965a39381a /rational.c | |
parent | a2ac0982cd5fc48ba3cafe3c9bdc48836eaa0bce (diff) |
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; |