diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-08-24 23:42:01 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-08-26 02:02:45 +0900 |
| commit | 60104ce41d503ed0c405d2488954f223798d9201 (patch) | |
| tree | ae541fd63189408fb0b7d2b10caf92d274dfe231 /src | |
| parent | 43ec918be1b878706259111f4e94daf118c50841 (diff) | |
| download | mruby-60104ce41d503ed0c405d2488954f223798d9201.tar.gz mruby-60104ce41d503ed0c405d2488954f223798d9201.zip | |
Silence compiler warning regarding float condition; fix #3790
Diffstat (limited to 'src')
| -rw-r--r-- | src/vm.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2310,9 +2310,9 @@ RETRY_TRY_BLOCK: mrb_int y = mrb_fixnum(regs[a+1]); double f; if (y == 0) { - if (x == 0) f = NAN; - else if (x > 0) f = INFINITY; + if (x > 0) f = INFINITY; else if (x < 0) f = -INFINITY; + else /* if (x == 0) */ f = NAN; } else { f = (mrb_float)x / (mrb_float)y; |
