aboutsummaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2026-06-27 21:07:50 +0200
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2026-06-27 21:08:53 +0200
commit5337d33cc6e46a6eb281f2abb325b29c882a82b2 (patch)
treec5110c4fa122f3fbbe4756543dd9921a0903594a /regexec.c
parent413bad8c8848bc2e31ac0034c58130ac67f3b1f8 (diff)
downloadterex-5337d33cc6e46a6eb281f2abb325b29c882a82b2.tar.gz
fixup REG_ANCHORED: the checks have to be in shortest()
I put them into longest() as well, but it appears that both find() and cfind() will always try shortest() first and should abort if that returns NULL.
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/regexec.c b/regexec.c
index 848d911..d047929 100644
--- a/regexec.c
+++ b/regexec.c
@@ -415,9 +415,6 @@ find(
if (end != NULL) {
break; /* NOTE BREAK OUT */
}
- if (v->eflags & REG_ANCHORED) {
- break; /* NOTE BREAK OUT */
- }
}
assert(end != NULL); /* search RE succeeded so loop should */
freedfa(d);
@@ -581,9 +578,6 @@ cfindloop(
estop = prevchr(v, end);
}
}
- if (v->eflags & REG_ANCHORED) {
- break; /* NOTE BREAK OUT */
- }
}
} while (close < v->stop);