diff options
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -757,6 +757,13 @@ ruby_strtod(string, endPtr) sign = FALSE; } + /* skip preceding zeros */ + if (*p == '0') { + while (*p == '0') + p++; + p--; + } + /* * Count the number of digits in the mantissa (including the decimal * point), and also locate the decimal point. |