aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/strings.c')
-rw-r--r--src/nvim/strings.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/strings.c b/src/nvim/strings.c
index 30a9052a1e..37a0fb82da 100644
--- a/src/nvim/strings.c
+++ b/src/nvim/strings.c
@@ -428,7 +428,7 @@ char_u *vim_strchr(const char_u *string, int c)
int l = (*mb_ptr2len)(p);
// Avoid matching an illegal byte here.
- if (utf_ptr2char(p) == c && l > 1) {
+ if (l > 1 && utf_ptr2char(p) == c) {
return (char_u *) p;
}
p += l;