summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bignum.c b/bignum.c
index 4c06a7ae59..9b3cf2745d 100644
--- a/bignum.c
+++ b/bignum.c
@@ -2028,6 +2028,9 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
}
}
+ while (buf < p && *buf == 0)
+ buf++;
+
if (POW2_P(base)) {
int flags = INTEGER_PACK_BIG_ENDIAN;
if (!sign)