diff options
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) { |