diff options
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index b164912c1c..d5ed1b1e04 100644 --- a/src/eval.c +++ b/src/eval.c @@ -4275,7 +4275,7 @@ eval6 ( else if (op == '/') { /* We rely on the floating point library to handle divide * by zero to result in "inf" and not a crash. */ - f1 = f1 / f2; + f1 = f2 != 0 ? f1 / f2 : INFINITY; } else { EMSG(_("E804: Cannot use '%' with Float")); return FAIL; |