diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-02-02 19:02:58 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-02-02 19:02:58 +0000 |
commit | b255fa570d8b041e4c81e3454d51e06100c2fa4f (patch) | |
tree | d3b246b467500ca48067ed4a45d2fa53966cd9f1 /src/nvim/spell.c | |
parent | eeccad2ff1ae8892fe9e06d733a7b07a166eecb0 (diff) | |
parent | 0bd07bea095a8000cffa4f379c1fa53e009c1143 (diff) | |
download | rneovim-20230125_mix.tar.gz rneovim-20230125_mix.tar.bz2 rneovim-20230125_mix.zip |
Merge branch 'aucmd_textputpost' into 20230125_mix20230125_mix
Diffstat (limited to 'src/nvim/spell.c')
-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 8e18be5bd1..2204cda169 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -1745,7 +1745,7 @@ void count_common_word(slang_T *lp, char *word, int len, uint8_t count) const size_t p_len = strlen(p); hashitem_T *hi = hash_lookup(&lp->sl_wordcount, (const char *)p, p_len, hash); if (HASHITEM_EMPTY(hi)) { - wc = xmalloc(sizeof(wordcount_T) + p_len); + wc = xmalloc(offsetof(wordcount_T, wc_word) + p_len + 1); memcpy(wc->wc_word, p, p_len + 1); wc->wc_count = count; hash_add_item(&lp->sl_wordcount, hi, (char *)wc->wc_word, hash); |