From 7aaa0f4888821826f1ff9b5bbd872b7c6f385f6e Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 26 Oct 2022 16:52:25 +0800 Subject: [PATCH] fix(spell): fix wrong cast Fix #20787 (cherry picked from commit 0b2ef98594572c89ceb124d466e9801023242750) --- src/nvim/spellsuggest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/spellsuggest.c b/src/nvim/spellsuggest.c index f2a0da188e..2bb8e9d9c6 100644 --- a/src/nvim/spellsuggest.c +++ b/src/nvim/spellsuggest.c @@ -2250,7 +2250,7 @@ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, bool so ftp = (fromto_T *)gap->ga_data + sp->ts_curi++; if (*ftp->ft_from != *p) { // past possible matching entries - sp->ts_curi = (char_u)gap->ga_len; + sp->ts_curi = (int16_t)gap->ga_len; break; } if (STRNCMP(ftp->ft_from, p, STRLEN(ftp->ft_from)) == 0