mirror of
https://github.com/neovim/neovim.git
synced 2025-12-01 14:33:11 +00:00
Fix warnings: spell.c: spell_read_aff(): Uninitialized arg: RI.
Problem : Uninitialized argument value @ 4469.
Diagnostic : Real issue.
Rationale : Happens when a line contains a spell info item (NAME, HOME,
VERSION, AUTHOR, EMAIL, COPYRIGHT), which expect a second
item, but then the second item is not present.
Resolution : Add guard (item count > 1) to failing branch.
This commit is contained in:
@@ -4466,7 +4466,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
|| aff->af_pref.ht_used > 0)
|
||||
smsg((char_u *)_("FLAG after using flags in %s line %d: %s"),
|
||||
fname, lnum, items[1]);
|
||||
} else if (spell_info_item(items[0])) {
|
||||
} else if (spell_info_item(items[0]) && itemcnt > 1) {
|
||||
p = (char_u *)getroom(spin,
|
||||
(spin->si_info == NULL ? 0 : STRLEN(spin->si_info))
|
||||
+ STRLEN(items[0])
|
||||
|
||||
Reference in New Issue
Block a user