summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 20:03:32 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 20:03:32 +0000
commita2eab05d610a39d462eaeef10d03799b2637e68d (patch)
tree2c1448b14d3c97c6bf0a54bd2af56e51a165116f /bignum.c
parent0b9586c4f55cf7c917b0595a01314d3c2ec90783 (diff)
merge revision(s) 14095:
* 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_6@16974 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 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);