patch 9.0.0804: crash when trying to divide a number by -1
Problem: Crash when trying to divice the largest negative number by -1.
Solution: Handle this case specifically.
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim
index b478963..e1fed36 100644
--- a/src/testdir/test_expr.vim
+++ b/src/testdir/test_expr.vim
@@ -761,6 +761,12 @@
call assert_equal('b', s:val)
endfunc
+func Test_divide_by_zero()
+ " only tests that this doesn't crash, the result is not important
+ echo 0 / 0
+ echo 0 / 0 / -1
+endfunc
+
" Test for command-line completion of expressions
func Test_expr_completion()
CheckFeature cmdline_compl