Merge pull request #2446 from take-cheeze/fix_mrb_flo_to_fixnum

Fix type checking in `mrb_flo_to_fixnum`.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-07-04 21:52:51 +09:00
+1 -1
View File
@@ -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. */
}