Fix typo in description.
[p5sagit/p5-mst-13.2.git] / pp_ctl.c
index 40928ca..45ca9ea 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -726,7 +726,7 @@ PP(pp_formline)
            {
                const char *s = chophere;
                if (chopspace) {
-                   while (*s && isSPACE(*s))
+                   while (isSPACE(*s))
                        s++;
                }
                sv_chop(sv,s);
@@ -864,7 +864,7 @@ PP(pp_formline)
                const char *s = chophere;
                const char *send = item + len;
                if (chopspace) {
-                   while (*s && isSPACE(*s) && s < send)
+                   while (isSPACE(*s) && (s < send))
                        s++;
                }
                if (s < send) {
@@ -1802,8 +1802,8 @@ PP(pp_enteriter)
            }
        }
        else if (PL_op->op_private & OPpITER_REVERSED) {
-           cx->blk_loop.itermax = -1;
-           cx->blk_loop.iterix = AvFILL(cx->blk_loop.iterary);
+           cx->blk_loop.itermax = 0;
+           cx->blk_loop.iterix = AvFILL(cx->blk_loop.iterary) + 1;
 
        }
     }
@@ -1811,8 +1811,8 @@ PP(pp_enteriter)
        cx->blk_loop.iterary = PL_curstack;
        AvFILLp(PL_curstack) = SP - PL_stack_base;
        if (PL_op->op_private & OPpITER_REVERSED) {
-           cx->blk_loop.itermax = MARK - PL_stack_base;
-           cx->blk_loop.iterix = cx->blk_oldsp;
+           cx->blk_loop.itermax = MARK - PL_stack_base + 1;
+           cx->blk_loop.iterix = cx->blk_oldsp + 1;
        }
        else {
            cx->blk_loop.iterix = MARK - PL_stack_base;