This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl -Dstv -e'... for min..max' displayed wrong stack elements
authorDave Mitchell <davem@fdisolutions.com>
Mon, 18 Jul 2005 00:16:31 +0000 (00:16 +0000)
committerDave Mitchell <davem@fdisolutions.com>
Mon, 18 Jul 2005 00:16:31 +0000 (00:16 +0000)
p4raw-id: //depot/perl@25163

pp_ctl.c

index 2a10ab0..dc91e6b 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1849,6 +1849,10 @@ PP(pp_enteriter)
                    DIE(aTHX_ "Range iterator outside integer range");
                cx->blk_loop.iterix = SvIV(sv);
                cx->blk_loop.itermax = SvIV(right);
                    DIE(aTHX_ "Range iterator outside integer range");
                cx->blk_loop.iterix = SvIV(sv);
                cx->blk_loop.itermax = SvIV(right);
+#ifdef DEBUGGING
+               /* for correct -Dstv display */
+               cx->blk_oldsp = sp - PL_stack_base;
+#endif
            }
            else {
                cx->blk_loop.iterlval = newSVsv(sv);
            }
            else {
                cx->blk_loop.iterlval = newSVsv(sv);