Commit c16bb3fe authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2446 from take-cheeze/fix_mrb_flo_to_fixnum

Fix type checking in `mrb_flo_to_fixnum`.
parents 742f8575 a50464fe
......@@ -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