summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-08-27 21:07:43 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2015-08-27 21:08:00 +0100
commitaeb325e6e832467c38c4baff1ee68c7726ad9f7c (patch)
tree69f92e1cdd7ce7e4bff6d5685051e176fe8afb0a /regcomp.c
parenta424c7b38e1d235ca8e5dc410ed51b7b4f9045e9 (diff)
downloadperl-aeb325e6e832467c38c4baff1ee68c7726ad9f7c.tar.gz
PATCH: [perl 125825] {n}+ possessive quantifier broken
I was unaware of this construct when I wrote the commit that broke it, and there were no tests for it. Now there are. (cherry picked from commit 9a7bb2f73a8a1b561890191974201d576371e7f9)
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/regcomp.c b/regcomp.c
index 84af011340..606b3373b3 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -10455,9 +10455,7 @@ S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
ret = reg_node(pRExC_state, OPFAIL);
return ret;
}
- else if (min == max
- && RExC_parse < RExC_end
- && (*RExC_parse == '?' || *RExC_parse == '+'))
+ else if (min == max && RExC_parse < RExC_end && *RExC_parse == '?')
{
if (SIZE_ONLY) {
ckWARN2reg(RExC_parse + 1,