mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 00:46:30 +00:00
vim-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.
569fea2c31
This commit is contained in:
@@ -5761,7 +5761,9 @@ cleanup_suggestions (
|
||||
xfree(stp[i].st_word);
|
||||
}
|
||||
gap->ga_len = keep;
|
||||
return stp[keep - 1].st_score;
|
||||
if (keep >= 1) {
|
||||
return stp[keep - 1].st_score;
|
||||
}
|
||||
}
|
||||
}
|
||||
return maxscore;
|
||||
|
Reference in New Issue
Block a user