mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bignum.c (rb_cstr_to_inum): Skip leading zeros.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f893b2f1f2
commit
551fe2bddc
2 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Mon Jul 1 12:02:39 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bignum.c (rb_cstr_to_inum): Skip leading zeros.
|
||||
|
||||
Mon Jul 1 00:59:23 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bignum.c (nlz16): New function.
|
||||
|
|
3
bignum.c
3
bignum.c
|
@ -2028,6 +2028,9 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
|
|||
}
|
||||
}
|
||||
|
||||
while (buf < p && *buf == 0)
|
||||
buf++;
|
||||
|
||||
if (POW2_P(base)) {
|
||||
int flags = INTEGER_PACK_BIG_ENDIAN;
|
||||
if (!sign)
|
||||
|
|
Loading…
Add table
Reference in a new issue