diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-05-20 22:23:20 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-20 22:23:20 +0800 |
commit | 76691bea04fcfb4e898e5822ae57c5b86ec06dbe (patch) | |
tree | 016ad66d79df565bd5052aa06304610dfc8680ad | |
parent | 1d160a76ec46e7eb4cfa627fb85987059fae55c4 (diff) | |
parent | 02fd4ec83f171b7dce626501630a23c8d2ada01a (diff) | |
download | rneovim-76691bea04fcfb4e898e5822ae57c5b86ec06dbe.tar.gz rneovim-76691bea04fcfb4e898e5822ae57c5b86ec06dbe.tar.bz2 rneovim-76691bea04fcfb4e898e5822ae57c5b86ec06dbe.zip |
Merge pull request #18657 from dundargoc/vim-8.2.4985
vim-patch:8.2.4985: PVS warns for possible array underrun
-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 1ba29e3fc1..df3ee73a28 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -443,7 +443,7 @@ size_t spell_check(win_T *wp, char_u *ptr, hlf_T *attrp, int *capcol, bool docou MAXWLEN + 1); mi.mi_fwordlen = (int)STRLEN(mi.mi_fword); - if (camel_case) { + if (camel_case && mi.mi_fwordlen > 0) { // introduce a fake word end space into the folded word. mi.mi_fword[mi.mi_fwordlen - 1] = ' '; } |