0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

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

@@ -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;
}