Silence compiler warning regarding float condition; fix #3790

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-08-24 23:42:01 +09:00
parent 43ec918be1
commit 60104ce41d
+2 -2
View File
@@ -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;