diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-30 11:20:03 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-30 11:20:03 +0000 |
commit | 8429f2be9fd3ac4bcc97580fece853fed6fc09bc (patch) | |
tree | f42bfb216f3178bfe5f150f2b3be5dc99d95b0ac /bignum.c | |
parent | 9ac5a0ca4ded8a8a933cc222b82b69d295b9b323 (diff) | |
download | ruby-8429f2be9fd3ac4bcc97580fece853fed6fc09bc.tar.gz |
adjustment
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -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); |