aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-12-25 18:42:07 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-12-26 00:29:15 -0500
commitd6ba578ccb68e7b79df9fabb8999e8daa2f2a5a5 (patch)
tree4c4e1d8c288766d01f46fe96d21f3afd24892ffd
parent251177b63b591018cf865e809692ba6eb18f7a5c (diff)
downloadrneovim-d6ba578ccb68e7b79df9fabb8999e8daa2f2a5a5.tar.gz
rneovim-d6ba578ccb68e7b79df9fabb8999e8daa2f2a5a5.tar.bz2
rneovim-d6ba578ccb68e7b79df9fabb8999e8daa2f2a5a5.zip
misc1: fix pvs/v781
-rw-r--r--src/nvim/misc1.c2
1 files changed, 1 insertions, 1 deletions
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;