rational.c: add explicit cast from `mrb_int` to `mrb_float`.

parent 590c1073
......@@ -641,7 +641,7 @@ mrb_rational_div(mrb_state *mrb, mrb_value x)
#ifndef MRB_NO_FLOAT
case MRB_TT_FLOAT:
{
mrb_float z = mrb_div_flo(p1->numerator, mrb_to_flo(mrb, y));
mrb_float z = mrb_div_flo((mrb_float)p1->numerator, mrb_to_flo(mrb, y));
return mrb_float_value(mrb, mrb_div_flo(z, (mrb_float)p1->denominator));
}
#else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment