fix: while we see partial matches, we can not yet enable NOTBOL

parent 929cf112
......@@ -435,19 +435,6 @@ match_iter_f(void *priv, unsigned flush, const void *ptr, ssize_t len)
reip->s, len, subject, len);
#endif
reip->options |= PCRE2_NOTBOL;
if (reip->s < PCRE2_ERROR_PARTIAL)
return (1);
if (reip->s == PCRE2_ERROR_NOMATCH) {
reip->startoffset = 0;
reip->b = 0;
reip->e = 0;
return (0);
}
CAST_OBJ_NOTNULL(ov, reip->task->priv, OV_MAGIC);
if (reip->s == PCRE2_ERROR_PARTIAL && reip->b != NULL)
......@@ -468,6 +455,19 @@ match_iter_f(void *priv, unsigned flush, const void *ptr, ssize_t len)
return (0);
}
reip->options |= PCRE2_NOTBOL;
if (reip->s < PCRE2_ERROR_PARTIAL)
return (1);
if (reip->s == PCRE2_ERROR_NOMATCH) {
reip->startoffset = 0;
reip->b = 0;
reip->e = 0;
return (0);
}
assert(reip->s > PCRE2_ERROR_NOMATCH);
if (reip->b == NULL && (flush & OBJ_ITER_FLUSH) == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment