`0/0` should not be infinity; fix #3752

parent 7b8d7840
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment