summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/numeric.c2
1 files changed, 1 insertions, 1 deletions
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. */
}