commit | ee03b941241eae1d36bc29b84eec09116cefe7cd | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Fri Oct 27 00:57:05 2017 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Fri Oct 27 00:57:05 2017 +0200 |
tree | ac93a13476ae91cb297aea0af44c4f4bb4b9888e | |
parent | cf1ba35fc2ebd41b9a7738bbd1f026f5311560aa [diff] [blame] |
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)
diff --git a/src/spellfile.c b/src/spellfile.c index 6188aaf..f6d7a64 100644 --- a/src/spellfile.c +++ b/src/spellfile.c
@@ -4277,7 +4277,7 @@ 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);