diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-07-04 21:52:51 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-07-04 21:52:51 +0900 |
| commit | c16bb3fee3ba0dfcd74b82fd2167c3fdd0593ba9 (patch) | |
| tree | c5d8c2e53a06d1c3c25640924aa73a7a89c34b59 /src/numeric.c | |
| parent | 742f85752d52b8f93d80674da600963a5f303980 (diff) | |
| parent | a50464fe0171305929fd9bda11b8bc474511b764 (diff) | |
| download | mruby-c16bb3fee3ba0dfcd74b82fd2167c3fdd0593ba9.tar.gz mruby-c16bb3fee3ba0dfcd74b82fd2167c3fdd0593ba9.zip | |
Merge pull request #2446 from take-cheeze/fix_mrb_flo_to_fixnum
Fix type checking in `mrb_flo_to_fixnum`.
Diffstat (limited to 'src/numeric.c')
| -rw-r--r-- | src/numeric.c | 2 |
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. */ } |
