From a50464fe0171305929fd9bda11b8bc474511b764 Mon Sep 17 00:00:00 2001 From: take_cheeze Date: Fri, 4 Jul 2014 16:16:06 +0900 Subject: Fix type checking in `mrb_flo_to_fixnum`. --- src/numeric.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/numeric.c') diff --git a/src/numeric.c b/src/numeric.c index db1e7d0f4..b8c3ae4a4 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -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. */ } -- cgit v1.2.3