aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/spellfile.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-01-16 00:07:14 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-01-16 00:08:22 +0100
commit6020e8b69ea59131be6fffd1667815f8742729db (patch)
tree8864c1e43885e9b98873d1363ef76ba3314b6f2b /src/nvim/spellfile.c
parentfe7a53f3cf23da7b9ad9ab702fd18058699089fc (diff)
downloadrneovim-6020e8b69ea59131be6fffd1667815f8742729db.tar.gz
rneovim-6020e8b69ea59131be6fffd1667815f8742729db.tar.bz2
rneovim-6020e8b69ea59131be6fffd1667815f8742729db.zip
vim-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 vim/vim#2252) https://github.com/vim/vim/commit/ee03b941241eae1d36bc29b84eec09116cefe7cd
Diffstat (limited to 'src/nvim/spellfile.c')
-rw-r--r--src/nvim/spellfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c
index 1f7f616782..df066e7ad3 100644
--- a/src/nvim/spellfile.c
+++ b/src/nvim/spellfile.c
@@ -3656,7 +3656,7 @@ static int 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(_("Invalid region nr in %s line %d: %s"),
fname, lnum, p);
break;