mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
vim-patch:8.2.4985: PVS warns for possible array underrun
Problem: PVS warns for possible array underrun.
Solution: Add a check for a positive value. (closes vim/vim#10451)
875339b22a
This commit is contained in:
parent
1d160a76ec
commit
02fd4ec83f
@ -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] = ' ';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user