diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-07-25 15:11:31 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-07-25 15:11:31 +0900 |
| commit | 9fa3d77114cebf57fdab8c4c177a9031df244f99 (patch) | |
| tree | 31ffb7455d1d0d9e0100c858a0312321b8d7b0da /src/vm.c | |
| parent | 7b8d784040f1fd88fce2658b704b300f7421c885 (diff) | |
| download | mruby-9fa3d77114cebf57fdab8c4c177a9031df244f99.tar.gz mruby-9fa3d77114cebf57fdab8c4c177a9031df244f99.zip | |
`0/0` should not be infinity; fix #3752
Diffstat (limited to 'src/vm.c')
| -rw-r--r-- | src/vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2372,7 +2372,7 @@ RETRY_TRY_BLOCK: mrb_int x = mrb_fixnum(regs[a]); mrb_int y = mrb_fixnum(regs[a+1]); double f; - if (y == 0) { + if (y == 0 && x != 0) { f = INFINITY; } else { |
