strings: Change order of operands in condition.

utf_ptr2char only needs to be called for l > 1.
This commit is contained in:
Jurica Bradaric
2016-01-23 15:37:45 +01:00
parent d22a821ce3
commit 4d0c511354

View File

@@ -428,7 +428,7 @@ char_u *vim_strchr(const char_u *string, int c)
int l = (*mb_ptr2len)(p); int l = (*mb_ptr2len)(p);
// Avoid matching an illegal byte here. // Avoid matching an illegal byte here.
if (utf_ptr2char(p) == c && l > 1) { if (l > 1 && utf_ptr2char(p) == c) {
return (char_u *) p; return (char_u *) p;
} }
p += l; p += l;