mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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:
+1
-1
@@ -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. */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user