diff options
-rw-r--r-- | src/nvim/spell.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index 00e977710f..7437a7a32f 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -3141,7 +3141,7 @@ static void spell_soundfold_wsal(slang_T *slang, const char *inword, char *res) c = *ws; } if (strstr(s, "^^") != NULL) { - if (c != NUL) { + if (c != NUL && reslen < MAXWLEN) { wres[reslen++] = c; } memmove(word, word + i + 1, sizeof(int) * (size_t)(wordlen - (i + 1) + 1)); |