summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-04 02:23:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-04 02:23:52 +0000
commit80644b31d5fa315bfe2ef73456557a9c985f88bd (patch)
treea811d0814fac825c6388953028a5e79864af908d /bignum.c
parent08494c864328d3d4b5ba2b4dcf0887845e04381d (diff)
* bignum.c (rb_cstr_to_inum): trailing spaces may exist at sqeezing
preceeding 0s. [ruby-core:13873] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 dd6d7b134c..624a4e5964 100644
--- a/bignum.c
+++ b/bignum.c
@@ -472,7 +472,7 @@ rb_cstr_to_inum(const char *str, int base, int 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);