diff options
author | Hugo van der Sanden <hv@crypt.org> | 2016-10-04 14:40:11 +0100 |
---|---|---|
committer | Hugo van der Sanden <hv@crypt.org> | 2016-10-04 15:02:36 +0100 |
commit | 2814f4b3549f665a6f9203ac9e890ae1e415e0dc (patch) | |
tree | 8587121c0636eef80c7c842eff140d9d266386a9 /regexec.c | |
parent | dbdb57e61cddbe8e7a199ac438f0523d0c20e4ce (diff) | |
download | perl-2814f4b3549f665a6f9203ac9e890ae1e415e0dc.tar.gz |
[perl #129350] anchored/floating substrings must be utf8 if target is
If the target is utf8 and either the anchored or floating substrings
are not, we need to create utf8 copies to check against. The state
of the two substrings may not be the same, but we were only testing
whichever we planned to check first.
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -703,7 +703,8 @@ Perl_re_intuit_start(pTHX_ reginfo->poscache_maxiter = 0; if (utf8_target) { - if (!prog->check_utf8 && prog->check_substr) + if ((!prog->anchored_utf8 && prog->anchored_substr) + || (!prog->float_utf8 && prog->float_substr)) to_utf8_substr(prog); check = prog->check_utf8; } else { |