aboutsummaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/regexec.c b/regexec.c
index d047929..848d911 100644
--- a/regexec.c
+++ b/regexec.c
@@ -415,6 +415,9 @@ 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);
@@ -578,6 +581,9 @@ cfindloop(
estop = prevchr(v, end);
}
}
+ if (v->eflags & REG_ANCHORED) {
+ break; /* NOTE BREAK OUT */
+ }
}
} while (close < v->stop);