p4raw-id: //depot/perl@33060
}
}
else if (PL_op->op_private & OPpITER_REVERSED) {
- cx->blk_loop.itermax = 0;
+ cx->blk_loop.itermax = 0xDEADBEEF;
cx->blk_loop.iterix = AvFILL(cx->blk_loop.iterary) + 1;
}
/* iterate array */
if (PL_op->op_private & OPpITER_REVERSED) {
/* In reverse, use itermax as the min :-) */
- if (cx->blk_loop.iterix <= cx->blk_loop.itermax)
+ if (cx->blk_loop.iterix <= (CxTYPE(cx) == CXt_LOOP_STACK
+ ? cx->blk_loop.itermax : 0))
RETPUSHNO;
if (SvMAGICAL(av) || AvREIFY(av)) {