From bfe84adb5a097488fa723f9917253bd6f0fbf662 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Tue, 28 Jan 2020 12:49:29 +0100 Subject: options: winhighlight: fix incorrect string equality test --- src/nvim/option.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/option.c b/src/nvim/option.c index cecfd7146c..37c0928d86 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3842,7 +3842,8 @@ static bool parse_winhl_opt(win_T *wp) w_hl_id_normal = hl_id; } else { for (hlf = 0; hlf < (int)HLF_COUNT; hlf++) { - if (strncmp(hlf_names[hlf], p, nlen) == 0) { + if (strlen(hlf_names[hlf]) == nlen + && strncmp(hlf_names[hlf], p, nlen) == 0) { w_hl_ids[hlf] = hl_id; break; } -- cgit