From 4d0c511354d93d963f76f44832db2c6b3dceda14 Mon Sep 17 00:00:00 2001 From: Jurica Bradaric Date: Sat, 23 Jan 2016 15:37:45 +0100 Subject: strings: Change order of operands in condition. utf_ptr2char only needs to be called for l > 1. --- src/nvim/strings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/strings.c') 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; -- cgit