From 1a8f60c7d2699826b51f23b040b83b1d96a14930 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 28 Nov 2023 10:47:22 +0800 Subject: refactor: move hashtab types to hashtab_defs.h (#26262) --- src/nvim/spellsuggest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/nvim/spellsuggest.c') diff --git a/src/nvim/spellsuggest.c b/src/nvim/spellsuggest.c index 1852f75432..af9f4db45a 100644 --- a/src/nvim/spellsuggest.c +++ b/src/nvim/spellsuggest.c @@ -3141,8 +3141,7 @@ static void check_suggestions(suginfo_T *su, garray_T *gap) // Need to append what follows to check for "the the". xstrlcpy(longword, stp[i].st_word, MAXWLEN + 1); int len = stp[i].st_wordlen; - xstrlcpy(longword + len, su->su_badptr + stp[i].st_orglen, - (size_t)(MAXWLEN - len + 1)); + xstrlcpy(longword + len, su->su_badptr + stp[i].st_orglen, MAXWLEN + 1 - (size_t)len); hlf_T attr = HLF_COUNT; (void)spell_check(curwin, longword, &attr, NULL, false); if (attr != HLF_COUNT) { -- cgit