summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c29
1 files changed, 7 insertions, 22 deletions
diff --git a/regcomp.c b/regcomp.c
index 66ac07e1d6..43f6b88d02 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -20761,30 +20761,15 @@ S_regtail_study(pTHX_ RExC_state_t *pRExC_state, regnode_offset p,
}
#endif
if ( exact ) {
- switch (OP(REGNODE_p(scan))) {
- case LEXACT:
- case EXACT:
- case LEXACT_REQ8:
- case EXACT_REQ8:
- case EXACTL:
- case EXACTF:
- case EXACTFU_S_EDGE:
- case EXACTFAA_NO_TRIE:
- case EXACTFAA:
- case EXACTFU:
- case EXACTFU_REQ8:
- case EXACTFLU8:
- case EXACTFUP:
- case EXACTFL:
- if( exact == PSEUDO )
- exact= OP(REGNODE_p(scan));
- else if ( exact != OP(REGNODE_p(scan)) )
- exact= 0;
- case NOTHING:
- break;
- default:
+ if (PL_regkind[OP(REGNODE_p(scan))] == EXACT) {
+ if (exact == PSEUDO )
+ exact= OP(REGNODE_p(scan));
+ else if (exact != OP(REGNODE_p(scan)) )
exact= 0;
}
+ else if (OP(REGNODE_p(scan)) != NOTHING) {
+ exact= 0;
+ }
}
DEBUG_PARSE_r({
DEBUG_PARSE_MSG((scan==p ? "tsdy" : ""));