summaryrefslogtreecommitdiff
path: root/pad.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-08-27 08:27:03 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-08-28 13:04:17 -0700
commit53d3c048a927d1699269806f3c36facac8c95023 (patch)
treea89048e35790014119d17f00b6e3e8c2021ffc94 /pad.c
parentf072719039fbeddb3ffe0c3971cd64af872f5c3d (diff)
downloadperl-53d3c048a927d1699269806f3c36facac8c95023.tar.gz
pad.c:pad_free: Don’t reset PL_padix if using pad_reset
pad_reset causes PL_padix to be reset at the beginning of each state- ment, so that operator targets can be reused. If we also reset it when freeing an operator, then theoretically tar- gets from operators later on in the same statement might be reused. I can’t come up with a test case, but it’s better to be safe than sorry.
Diffstat (limited to 'pad.c')
-rw-r--r--pad.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pad.c b/pad.c
index 271a9d83f4..be3d055c2a 100644
--- a/pad.c
+++ b/pad.c
@@ -1843,10 +1843,10 @@ Perl_pad_free(pTHX_ PADOFFSET po)
sv = PL_curpad[po];
if (sv && sv != &PL_sv_undef && !SvPADMY(sv))
SvFLAGS(sv) &= ~SVs_PADTMP;
-#endif
if ((I32)po < PL_padix)
PL_padix = po - 1;
+#endif
}
/*