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/regexp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/regexp.c') diff --git a/src/regexp.c b/src/regexp.c index b4fe7d7eb..e1f6484c0 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -4732,7 +4732,7 @@ regmatch( break; } if (enc_utf8) - opndc = mb_ptr2char(opnd); + opndc = utf_ptr2char(opnd); if (enc_utf8 && utf_iscomposing(opndc)) { /* When only a composing char is given match at any @@ -4741,7 +4741,7 @@ regmatch( for (i = 0; reginput[i] != NUL; i += utf_ptr2len(reginput + i)) { - inpc = mb_ptr2char(reginput + i); + inpc = utf_ptr2char(reginput + i); if (!utf_iscomposing(inpc)) { if (i > 0) @@ -4750,7 +4750,7 @@ regmatch( else if (opndc == inpc) { /* Include all following composing chars. */ - len = i + mb_ptr2len(reginput + i); + len = i + utfc_ptr2len(reginput + i); status = RA_MATCH; break; } -- cgit v1.2.1