diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-18 15:10:37 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-18 15:10:37 +0000 |
commit | ba15fda3593b4ba8c7c64c0cf9c9e59223997611 (patch) | |
tree | b85e5257516a598810b5dd2bd5c74a969df83c5e /bignum.c | |
parent | 63fabd365a5ca9fb1ff303bd58e3135cfacc9c71 (diff) | |
download | ruby-ba15fda3593b4ba8c7c64c0cf9c9e59223997611.tar.gz |
* bignum.c (rb_cstr_to_inum): wrong radix check. a patch from
Yusuke ENDOH <mame AT tsg.ne.jp> in [ruby-dev:32628].
* bignum.c (big2str_find_n1): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -801,7 +801,7 @@ big2str_find_n1(VALUE x, int base) }; long bits; - if (base < 2 && 36 < base) + if (base < 2 || 36 < base) rb_bug("illegal radix %d", base); if (FIXNUM_P(x)) { @@ -908,7 +908,7 @@ rb_big2str0(VALUE x, int base, int trim) return rb_str_new2("0"); } - if (base < 2 && 36 < base) + if (base < 2 || 36 < base) rb_raise(rb_eArgError, "illegal radix %d", base); n2 = big2str_find_n1(x, base); |