mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.0.1225: no check for spell region being zero
Problem: No check for spell region being zero. (geeknik) Solution: Check for zero. (closes #2252)
This commit is contained in:
@@ -4277,7 +4277,7 @@ spell_read_wordfile(spellinfo_T *spin, char_u *fname)
|
||||
flags |= WF_REGION;
|
||||
|
||||
l = *p - '0';
|
||||
if (l > spin->si_region_count)
|
||||
if (l == 0 || l > spin->si_region_count)
|
||||
{
|
||||
smsg((char_u *)_("Invalid region nr in %s line %d: %s"),
|
||||
fname, lnum, p);
|
||||
|
Reference in New Issue
Block a user