summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen McCamant <smcc@mit.edu>1998-03-19 15:28:02 -0600
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-04-02 15:38:19 +0000
commit849ca7eee6afa65773d8d77f064fee661fdef5f4 (patch)
tree80f47d4d8f57b5d5e686f90192709b3c407c7eee
parent2676273e521c11025a29307ad2079658dd171d4a (diff)
downloadperl-849ca7eee6afa65773d8d77f064fee661fdef5f4.tar.gz
Stale SP in pp_substr
p4raw-id: //depot/perl@848
-rw-r--r--pp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pp.c b/pp.c
index 249b909833..f2a6141eb4 100644
--- a/pp.c
+++ b/pp.c
@@ -1780,6 +1780,7 @@ PP(pp_substr)
len = POPi;
pos = POPi;
sv = POPs;
+ PUTBACK;
tmps = SvPV(sv, curlen);
if (pos >= arybase) {
pos -= arybase;
@@ -1846,6 +1847,7 @@ PP(pp_substr)
LvTARGLEN(TARG) = rem;
}
}
+ SPAGAIN;
PUSHs(TARG); /* avoid SvSETMAGIC here */
RETURN;
}