diff options
-rw-r--r-- | regcomp.c | 2 | ||||
-rw-r--r-- | t/op/re_tests | 1 |
2 files changed, 2 insertions, 1 deletions
@@ -6452,7 +6452,7 @@ S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth) *flagp = WORST; if (max > 0) *flagp |= HASWIDTH; - if (max && max < min) + if (max < min) vFAIL("Can't do {n,m} with n > m"); if (!SIZE_ONLY) { ARG1_SET(ret, (U16)min); diff --git a/t/op/re_tests b/t/op/re_tests index 2b74175dd2..0992b155cc 100644 --- a/t/op/re_tests +++ b/t/op/re_tests @@ -618,6 +618,7 @@ $(?<=^(a)) a y $1 a ((?>[^()]+)|\([^()]*\))+ ((abc(ade)ufh()()x y $& abc(ade)ufh()()x (?<=x+)y - c - Variable length lookbehind not implemented a{37,17} - c - Can't do {n,m} with n > m +a{37,0} - c - Can't do {n,m} with n > m \Z a\nb\n y $-[0] 3 \z a\nb\n y $-[0] 4 $ a\nb\n y $-[0] 3 |