diff options
| author | take_cheeze <[email protected]> | 2014-07-04 16:16:06 +0900 |
|---|---|---|
| committer | take_cheeze <[email protected]> | 2014-07-04 16:16:06 +0900 |
| commit | a50464fe0171305929fd9bda11b8bc474511b764 (patch) | |
| tree | c5d8c2e53a06d1c3c25640924aa73a7a89c34b59 /src/numeric.c | |
| parent | 742f85752d52b8f93d80674da600963a5f303980 (diff) | |
| download | mruby-a50464fe0171305929fd9bda11b8bc474511b764.tar.gz mruby-a50464fe0171305929fd9bda11b8bc474511b764.zip | |
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. */ } |
