summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2017-06-13 11:11:50 +0100
committerDavid Mitchell <davem@iabyn.com>2017-06-22 13:37:51 +0100
commit7da51ead2909b200bcf98a4ecc6c6c6e6a209943 (patch)
tree805a503454bcb2f573710af2a45afa1174e586e1 /pp.c
parentd5d91c1e89a7882099b788fe66dfd438c0eb0a9e (diff)
downloadperl-7da51ead2909b200bcf98a4ecc6c6c6e6a209943.tar.gz
extend stack on scalar empty list slice
In scalar context, an empty list slice returns PL_sv_undef. Extned the stack for this return value, since if there were no elements or indices, nothing was popped from the stack
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pp.c b/pp.c
index 6be3e783ee..768eb7d82a 100644
--- a/pp.c
+++ b/pp.c
@@ -5209,6 +5209,7 @@ PP(pp_lslice)
if (GIMME_V != G_ARRAY) {
if (lastlelem < firstlelem) {
+ EXTEND(SP, 1);
*firstlelem = &PL_sv_undef;
}
else {