aboutsummaryrefslogtreecommitdiffstats
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/object.c b/object.c
index 0a02e0f7f9..398dc6a1a7 100644
--- a/object.c
+++ b/object.c
@@ -2071,10 +2071,10 @@ rb_cstr_to_dbl(const char *p, int badcheck)
/* remove underscores between digits */
if (n == buf || !ISDIGIT(n[-1])) goto bad;
while (*++p == '_');
- if (badcheck) {
- if (!ISDIGIT(*p)) goto bad;
+ if (!ISDIGIT(*p)) {
+ if (badcheck) goto bad;
+ break;
}
- continue;
}
*n++ = *p++;
}