diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-03-12 19:23:00 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-03-12 19:23:00 +0100 |
commit | 385111bd86e0b38667879c3e89506ca1ae98e1df (patch) | |
tree | 5f1c3d68cd38bed97cec68adb2e61e4415d81f2b /src/syntax.c | |
parent | f6f32c38bf3319144a84a01a154c8c91939e7acf (diff) | |
download | vim-git-385111bd86e0b38667879c3e89506ca1ae98e1df.tar.gz |
patch 7.4.1547v7.4.1547
Problem: Getting a cterm highlight attribute that is not set results in the
string "-1".
Solution: Return an empty string. (Taro Muraoka)
Diffstat (limited to 'src/syntax.c')
-rw-r--r-- | src/syntax.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/syntax.c b/src/syntax.c index e37dacb8f..ac80ab4e7 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -8999,6 +8999,8 @@ highlight_color( n = HL_TABLE()[id - 1].sg_cterm_fg - 1; else n = HL_TABLE()[id - 1].sg_cterm_bg - 1; + if (n < 0) + return NULL; sprintf((char *)name, "%d", n); return name; } |