summaryrefslogtreecommitdiff
path: root/pcre_jit_compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcre_jit_compile.c')
-rw-r--r--pcre_jit_compile.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c
index 538cee5..dd378e0 100644
--- a/pcre_jit_compile.c
+++ b/pcre_jit_compile.c
@@ -7255,12 +7255,14 @@ if (opcode == OP_COND || opcode == OP_SCOND)
add_jump(compiler, &(BACKTRACK_AS(bracket_backtrack)->u.condfailed), JUMP(SLJIT_ZERO));
matchingpath += 1 + 2 * IMM2_SIZE;
}
- else if (*matchingpath == OP_RREF || *matchingpath == OP_DNRREF)
+ else if (*matchingpath == OP_RREF || *matchingpath == OP_DNRREF || *matchingpath == OP_FAIL)
{
/* Never has other case. */
BACKTRACK_AS(bracket_backtrack)->u.condfailed = NULL;
SLJIT_ASSERT(!has_alternatives);
+ if (*matchingpath == OP_FAIL)
+ stacksize = 0;
if (*matchingpath == OP_RREF)
{
stacksize = GET2(matchingpath, 1);
@@ -7310,17 +7312,6 @@ if (opcode == OP_COND || opcode == OP_SCOND)
matchingpath = cc;
}
}
- else if (*matchingpath == OP_FAIL)
- {
- SLJIT_ASSERT(!has_alternatives);
- if (*cc == OP_ALT)
- {
- matchingpath = cc + 1 + LINK_SIZE;
- cc += GET(cc, 1);
- }
- else
- matchingpath = cc;
- }
else
{
SLJIT_ASSERT(has_alternatives && *matchingpath >= OP_ASSERT && *matchingpath <= OP_ASSERTBACK_NOT);