]> granicus.if.org Git - vim/commitdiff
Avoid illegal memory access in spell suggestion. (Dominique Pelle)
authorBram Moolenaar <Bram@vim.org>
Sun, 1 Aug 2010 13:47:35 +0000 (15:47 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 1 Aug 2010 13:47:35 +0000 (15:47 +0200)
src/spell.c

index 8ae264df5d0fe82e22469dd0f61422ae7810b357..b7e91ae369f83e4c8bf8d57a371f85d507707e1f 100644 (file)
@@ -11658,7 +11658,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
                     * words, the edit distance and then add them. */
                    add_sound_suggest(su, preword, sp->ts_score, lp);
                }
-               else
+               else if (sp->ts_fidx > 0)
                {
                    /* Give a penalty when changing non-word char to word
                     * char, e.g., "thes," -> "these". */