summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index 97be53faf1..b6e551b837 100644
--- a/bignum.c
+++ b/bignum.c
@@ -733,7 +733,8 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
if (badcheck) goto bad;
break;
}
- nondigit = (char) c;
+ if (badcheck)
+ nondigit = (char) c;
continue;
}
else if ((c = conv_digit(c)) < 0) {