1
0
forked from aniani/vim

patch 8.0.0520: using a function pointer while the function is known

Problem:    Using a function pointer instead of the actual function, which we
            know.
Solution:   Change mb_ functions to utf_ functions when already checked for
            Unicode. (Dominique Pelle, closes #1582)
This commit is contained in:
Bram Moolenaar
2017-03-29 17:30:27 +02:00
parent 0c078fc7db
commit ace95989ed
7 changed files with 21 additions and 19 deletions

View File

@@ -1874,7 +1874,7 @@ vim_strchr(char_u *string, int c)
{
while (*p != NUL)
{
int l = (*mb_ptr2len)(p);
int l = utfc_ptr2len(p);
/* Avoid matching an illegal byte here. */
if (utf_ptr2char(p) == c && l > 1)