diff options
Diffstat (limited to 'src/nvim/spellsuggest.c')
-rw-r--r-- | src/nvim/spellsuggest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/spellsuggest.c b/src/nvim/spellsuggest.c index 938e8cec8f..15ec652859 100644 --- a/src/nvim/spellsuggest.c +++ b/src/nvim/spellsuggest.c @@ -3146,7 +3146,7 @@ static void add_suggestion(suginfo_T *su, garray_T *gap, const char *goodword, i if (i < 0) { // Add a suggestion. stp = GA_APPEND_VIA_PTR(suggest_T, gap); - stp->st_word = xstrnsave(goodword, (size_t)goodlen); + stp->st_word = xmemdupz(goodword, (size_t)goodlen); stp->st_wordlen = goodlen; stp->st_score = score; stp->st_altscore = altscore; |