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
commit786a92feb034a20aa02076a8b81168d1d119d9d5 (patch)
tree3c894eaf05699443135cfb4f0fa588dd921b7c98 /bignum.c
parenta953db445d3ffd86f7385c79a31e7e1ab576e620 (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/branches/ruby_1_8@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 2fd7624110..b43b5993ba 100644
--- a/bignum.c
+++ b/bignum.c
@@ -449,7 +449,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);