From ace95989ed81929a84e205b26d0972cb9d6b4b19 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 29 Mar 2017 17:30:27 +0200 Subject: 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) --- src/misc2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/misc2.c') diff --git a/src/misc2.c b/src/misc2.c index 2ded997de..2f9fed57a 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -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) -- cgit v1.2.3