Commit a50464fe authored by take_cheeze's avatar take_cheeze

Fix type checking in `mrb_flo_to_fixnum`.

parent 742f8575
......@@ -1085,7 +1085,7 @@ mrb_flo_to_fixnum(mrb_state *mrb, mrb_value x)
{
mrb_int z;
if (mrb_float_p(x)) {
if (!mrb_float_p(x)) {
mrb_raise(mrb, E_TYPE_ERROR, "non float value");
z = 0; /* not reached. just suppress warnings. */
}
......
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