mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
vim-patch:9.0.0240: crash when using ":mkspell" with an empty .dic file
Problem: Crash when using ":mkspell" with an empty .dic file.
Solution: Check for an empty word tree.
6669de1b23
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -4971,9 +4971,12 @@ static int sug_filltree(spellinfo_T *spin, slang_T *slang)
|
||||
spin->si_sugtree = true;
|
||||
|
||||
// Go through the whole case-folded tree, soundfold each word and put it
|
||||
// in the trie.
|
||||
// in the trie. Bail out if the tree is empty.
|
||||
byts = slang->sl_fbyts;
|
||||
idxs = slang->sl_fidxs;
|
||||
if (byts == NULL || idxs == NULL) {
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
arridx[0] = 0;
|
||||
curi[0] = 1;
|
||||
|
Reference in New Issue
Block a user