# HG changeset patch # User Bram Moolenaar # Date 1280670455 -7200 # Node ID 6c1d10a853984a8488f6b421bc84ab6fe69b94f8 # Parent 2876ac15b8c88b8ead62e6647fe228fb1a63d6e7 Avoid illegal memory access in spell suggestion. (Dominique Pelle) diff --git a/src/spell.c b/src/spell.c --- a/src/spell.c +++ b/src/spell.c @@ -11658,7 +11658,7 @@ suggest_trie_walk(su, lp, fword, soundfo * 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". */