Fix argument error when built with MRB_WITHOUT_FLOAT flag

Fixed inproper argument of mrb_fixnum_value() called in integral_div(),
when built with MRB_WITHOUT_FLOAT flag.

Co-authored-by: taiyoslime <t@iyosli.me>
Co-authored-by: n4o847 <22975590+n4o847@users.noreply.github.com>
This commit is contained in:
ssmallkirby
2020-10-12 14:16:18 +09:00
parent 9ea7b71868
commit afc0d7a6c3
+1 -1
View File
@@ -158,7 +158,7 @@ integral_div(mrb_state *mrb, mrb_value xv)
if (y == 0) {
mrb_raise(mrb, E_RUNTIME_ERROR, "devided by zero");
}
return mrb_fixnum_value(mrb, mrb_fixnum(xv) / y);
return mrb_fixnum_value(mrb_fixnum(xv) / y);
#else
mrb_float x, y;