summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regex.c b/regex.c
index fea8bf9f7e..d684eca835 100644
--- a/regex.c
+++ b/regex.c
@@ -3196,7 +3196,7 @@ re_search(bufp, string, size, startpos, range, regs)
}
}
if (bufp->options & RE_OPTIMIZE_ANCHOR) {
- if (bufp->options&RE_OPTION_SINGLELINE) {
+ if (bufp->options&RE_OPTION_MULTILINE && range > 0) {
goto begbuf_match;
}
anchor = 1;