f_spellbadword: set len=0 for non-found word

`len` is used with `list_append_string` later, and should reflect the
length of `word` (i.e. 0 when not setting word / breaking above).

Ref: neovim/neovim#9782 (comment)
This commit is contained in:
Daniel Hahler 2019-08-08 21:40:29 -04:00 committed by Jan Edmund Lazo
parent d1ce15f696
commit 480794146f
1 changed files with 1 additions and 0 deletions

View File

@ -16764,6 +16764,7 @@ static void f_spellbadword(typval_T *argvars, typval_T *rettv, FunPtr fptr)
}
str += len;
capcol -= len;
len = 0;
}
}
}