changeset 2457:6c1d10a85398 vim73

Avoid illegal memory access in spell suggestion. (Dominique Pelle)
author Bram Moolenaar <bram@vim.org>
date Sun, 01 Aug 2010 15:47:35 +0200
parents 2876ac15b8c8
children 22a6f99e6477
files src/spell.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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". */