summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index 25ca9be87e..9a5b3c154a 100644
--- a/bignum.c
+++ b/bignum.c
@@ -446,7 +446,7 @@ rb_cstr_to_inum(str, base, badcheck)
}
if (*str == '0') { /* squeeze preceeding 0s */
while (*++str == '0');
- if (!*str) --str;
+ if (!(c = *str) || ISSPACE(c)) --str;
}
c = *str;
c = conv_digit(c);