diff options
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -783,9 +783,9 @@ ruby_strtod(string, endPtr) * and also locate the decimal point. */ - for ( ; c = *p; p++) { + for ( ; (c = *p) != '\0'; p++) { if (!ISDIGIT(c)) { - if (c != '.' || hasPoint) { + if (c != '.' || hasPoint || !ISDIGIT(p[1])) { break; } hasPoint = Qtrue; |