aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/indent_c.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/indent_c.c')
-rw-r--r--src/nvim/indent_c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/indent_c.c b/src/nvim/indent_c.c
index 6f75183a5a..e6dc985726 100644
--- a/src/nvim/indent_c.c
+++ b/src/nvim/indent_c.c
@@ -150,7 +150,7 @@ static const char_u *skip_string(const char_u *p)
i++;
}
}
- if (p[i] == '\'') { // check for trailing '
+ if (p[i - 1] != NUL && p[i] == '\'') { // check for trailing '
p += i;
continue;
}