summaryrefslogtreecommitdiffstats
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bignum.c b/bignum.c
index 624a4e596..c840fe06f 100644
--- a/bignum.c
+++ b/bignum.c
@@ -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);