summaryrefslogtreecommitdiff
path: root/ext/bigdecimal
diff options
context:
space:
mode:
authorKenta Murata <mrkn@mrkn.jp>2021-01-06 13:39:09 +0900
committerKenta Murata <mrkn@mrkn.jp>2021-01-06 13:39:09 +0900
commit7da06c04b21304e8b96089c74ea9aa49ea985e65 (patch)
treea373883f174375c5c5b420029c5127446c079b46 /ext/bigdecimal
parentf289f8ae3ab3e76287597722c52cd8cfcfc694ad (diff)
Need to convert the return value of rb_big_cmp
Diffstat (limited to 'ext/bigdecimal')
-rw-r--r--ext/bigdecimal/bigdecimal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index a912908..7f671f1 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -2766,7 +2766,7 @@ rb_big_convert_to_BigDecimal(VALUE val, RB_UNUSED_VAR(size_t digs), int raise_ex
assert(RB_TYPE_P(val, T_BIGNUM));
size_t size = rb_absint_size(val, NULL);
- int sign = rb_big_cmp(val, INT2FIX(0));
+ int sign = FIX2INT(rb_big_cmp(val, INT2FIX(0)));
if (size <= sizeof(long)) {
if (sign < 0) {
return rb_int64_convert_to_BigDecimal(NUM2LONG(val), digs, raise_exception);