summaryrefslogtreecommitdiff
path: root/lib/libc/regex/engine.c
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2016-06-24 02:28:24 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2016-06-24 02:28:24 +0000
commit130a0d8ddeb81e4acbd887399b82cd2645002ebe (patch)
tree1963f1ad28234d91e721f3b0058666066fbc7885 /lib/libc/regex/engine.c
parent10a9d57def07521d9fbf1bdf9a803cca84ff29cf (diff)
Notes
Diffstat (limited to 'lib/libc/regex/engine.c')
-rw-r--r--lib/libc/regex/engine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c
index 2ca971ba22dd2..a756bba596936 100644
--- a/lib/libc/regex/engine.c
+++ b/lib/libc/regex/engine.c
@@ -786,7 +786,7 @@ fast( struct match *m,
ASSIGN(fresh, st);
SP("start", st, *p);
coldp = NULL;
- if (start == m->beginp)
+ if (start == m->offp || (start == m->beginp && !(m->eflags&REG_NOTBOL)))
c = OUT;
else {
/*
@@ -891,7 +891,7 @@ slow( struct match *m,
SP("sstart", st, *p);
st = step(m->g, startst, stopst, st, NOTHING, st);
matchp = NULL;
- if (start == m->beginp)
+ if (start == m->offp || (start == m->beginp && !(m->eflags&REG_NOTBOL)))
c = OUT;
else {
/*