summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--regcomp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/regcomp.c b/regcomp.c
index 2283d109fa..7850492497 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -2168,6 +2168,8 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp)
/* FALL THROUGH*/
case '?': /* (??...) */
logical = 1;
+ if (*RExC_parse != '{')
+ goto unknown;
paren = *RExC_parse++;
/* FALL THROUGH */
case '{': /* (?{...}) */