patch 8.2.0039: memory access error when "z=" has no suggestions
Problem: Memory access error when "z=" has no suggestions.
Solution: Check for negative index.
diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim
index 091276b..7080c20 100644
--- a/src/testdir/test_spell.vim
+++ b/src/testdir/test_spell.vim
@@ -241,9 +241,7 @@
\ .. "Type number and <Enter> or click with mouse (empty cancels): ", a)
set spell spellsuggest=0
- " FIXME: the following line is currently commented out as it triggers a
- " memory error detected in cleanup_suggestions() by asan or valgrind.
- "call assert_equal("\nSorry, no suggestions", execute('norm z='))
+ call assert_equal("\nSorry, no suggestions", execute('norm z='))
" Unlike z=, function spellsuggest(...) should not be affected by the
" max number of suggestions (2) set by the 'spellsuggest' option.