зеркало из https://github.com/github/ruby.git
* bignum.c (rb_cstr_to_inum): should not erase all 0s, but
squeeze into one. [ruby-dev:19377] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
b1e4030244
Коммит
587e7ac7e7
|
@ -1,3 +1,8 @@
|
|||
Sat Jan 18 14:53:49 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* bignum.c (rb_cstr_to_inum): should not erase all 0s, but
|
||||
squeeze into one. [ruby-dev:19377]
|
||||
|
||||
Fri Jan 17 03:33:42 2003 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* sprintf.c (rb_f_sprintf): Fix a bug caused by an uninitialized
|
||||
|
|
6
bignum.c
6
bignum.c
|
@ -392,8 +392,10 @@ rb_cstr_to_inum(str, base, badcheck)
|
|||
}
|
||||
break;
|
||||
}
|
||||
while (*str == '0') str++; /* squeeze preceeding 0s */
|
||||
|
||||
if (*str == '0') { /* squeeze preceeding 0s */
|
||||
while (*++str == '0');
|
||||
--str;
|
||||
}
|
||||
len *= strlen(str)*sizeof(char);
|
||||
|
||||
if (len <= (sizeof(VALUE)*CHAR_BIT)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче