accordingly to further discussions with Greg Chapman in patch #712900.
return i;
state->repeat = rp;
state->ptr = ptr;
+ LASTMARK_RESTORE();
return 0;
case SRE_OP_MIN_UNTIL:
if (!rp)
return SRE_ERROR_STATE;
+ state->ptr = ptr;
+
count = rp->count + 1;
TRACE(("|%p|%p|MIN_UNTIL %d %p\n", pattern, ptr, count,
rp->pattern));
- state->ptr = ptr;
+ LASTMARK_SAVE();
if (count < rp->pattern[1]) {
/* not enough matches */
return i;
rp->count = count-1;
state->ptr = ptr;
+ LASTMARK_RESTORE();
return 0;
}
- LASTMARK_SAVE();
-
/* see if the tail matches */
state->repeat = rp->prev;
i = SRE_MATCH(state, pattern, level + 1);
state->repeat = rp;
LASTMARK_RESTORE();
-
if (count >= rp->pattern[2] && rp->pattern[2] != 65535)
return 0;
return i;
rp->count = count - 1;
state->ptr = ptr;
+ LASTMARK_RESTORE();
return 0;
default: