summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vm.c b/src/vm.c
index 5ab5fcdf3..fe622861e 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -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 {