From 8429f2be9fd3ac4bcc97580fece853fed6fc09bc Mon Sep 17 00:00:00 2001 From: tadf Date: Wed, 30 Jan 2008 11:20:03 +0000 Subject: adjustment git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bignum.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'bignum.c') diff --git a/bignum.c b/bignum.c index eae1f7e735..f8400b0f49 100644 --- a/bignum.c +++ b/bignum.c @@ -470,16 +470,15 @@ rb_cstr_to_inum(const char *str, int base, int badcheck) break; } if (*str == '0') { /* squeeze preceding 0s */ - int nn = 0; - while ((c = *++str) == '0' || c == '_') { - if (c == '_') { - nn++; - if (nn >= 2) - break; - } else - nn = 0; - } - if (!(c = *str) || ISSPACE(c)) --str; + int us = 0; + while ((c = *++str) == '0' || c == '_') { + if (c == '_') { + if (++us >= 2) + break; + } else + us = 0; + } + if (!(c = *str) || ISSPACE(c)) --str; } c = *str; c = conv_digit(c); -- cgit v1.2.3