From 80644b31d5fa315bfe2ef73456557a9c985f88bd Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 4 Dec 2007 02:23:52 +0000 Subject: * 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 --- bignum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bignum.c') 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); -- cgit v1.2.3