summaryrefslogtreecommitdiff
path: root/src/syntax.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-08-19 21:35:35 +0200
committerBram Moolenaar <Bram@vim.org>2017-08-19 21:35:35 +0200
commitd6a7b3e6bbb8f87507de68d86cf70eab806aab3a (patch)
tree7c223144fa8f8b7372b9e6f183633aa53de4cebe /src/syntax.c
parentdc926dd0dd0ef72fe7993f134f2cc1551cd269ea (diff)
downloadvim-git-d6a7b3e6bbb8f87507de68d86cf70eab806aab3a.tar.gz
patch 8.0.0970: passing invalid highlight idv8.0.0970
Problem: if there is no StatusLine highlighting and there is StatusLineNC or StatusLineTermNC highlighting then an invalid highlight id is passed to combine_stl_hlt(). (Coverity) Solution: Check id_S to be -1 instead of zero.
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 637a45012..730357520 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -9999,7 +9999,7 @@ highlight_changed(void)
if (ga_grow(&highlight_ga, 28) == FAIL)
return FAIL;
hlcnt = highlight_ga.ga_len;
- if (id_S == 0)
+ if (id_S == -1)
{
/* Make sure id_S is always valid to simplify code below. Use the last
* entry. */