diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-03-29 17:30:27 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-03-29 17:30:27 +0200 |
commit | ace95989ed81929a84e205b26d0972cb9d6b4b19 (patch) | |
tree | e6d6813abe2e2671741c7ca27864d85969ec601b /src/regexp.c | |
parent | 0c078fc7db2902d4ccba04506db082ddbef45a8c (diff) | |
download | vim-git-ace95989ed81929a84e205b26d0972cb9d6b4b19.tar.gz |
patch 8.0.0520: using a function pointer while the function is knownv8.0.0520
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)
Diffstat (limited to 'src/regexp.c')
-rw-r--r-- | src/regexp.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |