}
}
REGCP_SET;
- if (regmatch(prog->program + 1) && reginput >= regtill) {
+ if (regmatch(prog->program + 1)) {
prog->startp[0] = startpos;
prog->endp[0] = reginput;
return 1;
SvPVX(prop));
} );
-#ifdef REGALIGN
next = scan + NEXT_OFF(scan);
if (next == scan)
next = NULL;
-#else
- next = regnext(scan);
-#endif
switch (OP(scan)) {
case BOL:
regendp[n] = 0;
*reglastparen = n;
scan = next;
-#ifdef REGALIGN
/*SUPPRESS 560*/
if (n = (c1 == BRANCH ? NEXT_OFF(next) : ARG(next)))
next += n;
else
next = NULL;
-#else
- next = regnext(next);
-#endif
inner = NEXTOPER(scan);
if (c1 == BRANCHJ) {
inner = NEXTOPER(inner);
break;
case CURLYM:
{
- I32 l;
+ I32 l = 0;
CHECKPOINT lastcp;
/* We suppose that the next guy does not need
and has no parenths to influence future backrefs. */
ln = ARG1(scan); /* min to match */
n = ARG2(scan); /* max to match */
-#ifdef REGALIGN_STRUCT
paren = scan->flags;
if (paren) {
if (paren > regsize)
if (paren > *reglastparen)
*reglastparen = paren;
}
-#endif
scan = NEXTOPER(scan) + NODE_STEP_REGNODE;
if (paren)
scan += NEXT_OFF(scan); /* Skip former OPEN. */
}
sayNO;
break;
- case SUCCEED:
case END:
+ if (locinput < regtill)
+ sayNO; /* Cannot match: too short. */
+ /* Fall through */
+ case SUCCEED:
reginput = locinput; /* put where regtry can find it */
sayYES; /* Success! */
case SUSPEND: