summaryrefslogtreecommitdiff
path: root/src/spellfile.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-10-27 00:57:05 +0200
committerBram Moolenaar <Bram@vim.org>2017-10-27 00:57:05 +0200
commitee03b941241eae1d36bc29b84eec09116cefe7cd (patch)
treeac93a13476ae91cb297aea0af44c4f4bb4b9888e /src/spellfile.c
parentcf1ba35fc2ebd41b9a7738bbd1f026f5311560aa (diff)
downloadvim-git-ee03b941241eae1d36bc29b84eec09116cefe7cd.tar.gz
patch 8.0.1225: no check for spell region being zerov8.0.1225
Problem: No check for spell region being zero. (geeknik) Solution: Check for zero. (closes #2252)
Diffstat (limited to 'src/spellfile.c')
-rw-r--r--src/spellfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/spellfile.c b/src/spellfile.c
index 6188aaf40..f6d7a6432 100644
--- a/src/spellfile.c
+++ b/src/spellfile.c
@@ -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);