summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-10-13 19:56:45 -0600
committerKarl Williamson <public@khwilliamson.com>2011-10-13 20:44:11 -0600
commit7c1b9f38fcbfdb3a9e1766e02bcb991d1a5452d9 (patch)
tree3c98257ee4c0e05264c07aa2028e2390d865e3f0 /regexec.c
parent6af864889434f3aedc5ff52cae277d1cbfa476d6 (diff)
downloadperl-7c1b9f38fcbfdb3a9e1766e02bcb991d1a5452d9.tar.gz
regexec.c: Fix "\x{FB01}\x{FB00}" =~ /ff/i
Only the first character of the string was being checked when scanning for the beginning position of the pattern match. This was so wrong, it looks like it has to be a regression. I experimented a little and did not find any. I believe (but am not certain) that a multi-char fold has to be involved. The the handling of these was so broken before 5.14 that there very well may not be a regression.
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/regexec.c b/regexec.c
index 95462e470c..d063308d17 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1535,7 +1535,8 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s,
? utf8_length((U8 *) pat_string, (U8 *) pat_end)
: ln;
- e = HOP3c(strend, -((I32)lnc), s);
+ /* Set the end position to the final character available */
+ e = HOP3c(strend, -1, s);
if (!reginfo && e < s) {
e = s; /* Due to minlen logic of intuit() */