diff options
author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-02-17 02:21:39 +0000 |
---|---|---|
committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-02-17 02:21:39 +0000 |
commit | 386352b47463a112027a227cefc86b226ed8fd7b (patch) | |
tree | fdfa3437bb61bdbd7fbe821683bdd82f65ee5313 /util.c | |
parent | 26899051a0456daffa5ddbaecc8fa566dad49dfc (diff) |
* util.c (ruby_strtod): Float("1e") should fail. [ruby-core:7330]
* pack.c (EXTEND32): unpack("l") did not work where sizeof(long) != 4.
[ruby-talk:180024]
* pack.c (pack_unpack): fixed integer overflow on template "w".
[ruby-talk:180126]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -863,9 +863,15 @@ ruby_strtod(string, endPtr) } expSign = FALSE; } - while (ISDIGIT(*p)) { - exp = exp * 10 + (*p - '0'); - p += 1; + if (ISDIGIT(*p)) { + do { + exp = exp * 10 + (*p - '0'); + p += 1; + } + while (ISDIGIT(*p)); + } + else { + p = pExp; } } if (expSign) { |