mirror of
https://github.com/vim/vim.git
synced 2025-10-06 05:44:14 -04:00
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.
This commit is contained in:
@@ -761,6 +761,12 @@ func Test_eval_after_if()
|
||||
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
|
||||
|
Reference in New Issue
Block a user