diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-07-15 08:08:59 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-07-15 08:08:59 +0000 |
commit | 5292b2727a089821f2bf21dfcc8a7be899eb744c (patch) | |
tree | 915cfed250c76da4a41fe65143d8fa86f14e562a /util.c | |
parent | 363c90853ec4cceb58ef1d2d3192a8c65a35aa13 (diff) |
util.c: do not underflow
* util.c (ruby_strtod): do not underflow only by preceeding zeros,
which may be canceled out by the exponent.
http://twitter.com/kazuho/status/753829998767714305
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2145,7 +2145,7 @@ break2: for (; c >= '0' && c <= '9'; c = *++s) { have_dig: nz++; - if (nf > DBL_DIG * 4) continue; + if (nd > DBL_DIG * 4) continue; if (c -= '0') { nf += nz; for (i = 1; i < nz; i++) |