This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regexec.c: Fix "\x{FB01}\x{FB00}" =~ /ff/i
[perl5.git] / regexec.c
index 95462e4..d063308 100644 (file)
--- 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() */