From d6ba578ccb68e7b79df9fabb8999e8daa2f2a5a5 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 25 Dec 2019 18:42:07 -0500 Subject: misc1: fix pvs/v781 --- src/nvim/misc1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index a871d424c6..8c19a2de66 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -277,7 +277,7 @@ int get_last_leader_offset(char_u *line, char_u **flags) // whitespace. Otherwise we would think we are inside a // comment if the middle part appears somewhere in the middle // of the line. E.g. for C the "*" appears often. - for (j = 0; ascii_iswhite(line[j]) && j <= i; j++) { + for (j = 0; j <= i && ascii_iswhite(line[j]); j++) { } if (j < i) { continue; -- cgit