diff options
author | Yves Orton <demerphq@gmail.com> | 2015-10-04 14:13:44 +0200 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2015-10-04 14:17:12 +0200 |
commit | 6625d92602279361acd0c6185b78c6d201fd81e0 (patch) | |
tree | 5597fc17c0b4149929d0d7628fc0dedb2e19636c /regexec.c | |
parent | 0f8d761c4673440b49eeb491136a67dcf3da7400 (diff) | |
download | perl-6625d92602279361acd0c6185b78c6d201fd81e0.tar.gz |
fix perl-126222 - (?!) OPFAIL optimization does work in (?(?!)yes|no)
OPFAIL should trigger the no branch when used in this context
Thanks to Victor Adam for the report.
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -7722,7 +7722,15 @@ NULL /* FALLTHROUGH */ case OPFAIL: /* (*FAIL) */ - sayNO; + if (logical) { + /* deal with (?(?!)X|Y) properly, + * make sure we trigger the no branch + * of the trailing IFTHEN structure*/ + sw= 0; + break; + } else { + sayNO; + } /* NOTREACHED */ NOT_REACHED; /* NOTREACHED */ |