mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Silence compiler warning regarding float condition; fix #3790
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user