summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2004-05-03 18:52:39 +0000
committerDave Mitchell <davem@fdisolutions.com>2004-05-03 18:52:39 +0000
commit9111c9c032460b8a1a0f3c5ec70114106769f656 (patch)
tree21f492fe49072348b4cd2d58101334f453dc45b2 /pp.c
parente3a8873fee48db53bdab7f38729038b2eab97f0b (diff)
downloadperl-9111c9c032460b8a1a0f3c5ec70114106769f656.tar.gz
[perl #29127] scalar delete of empty slice returned garbage
p4raw-id: //depot/perl@22775
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index a3e56d3ff6..4ce78678db 100644
--- a/pp.c
+++ b/pp.c
@@ -3795,7 +3795,10 @@ PP(pp_delete)
SP = ORIGMARK;
else if (gimme == G_SCALAR) {
MARK = ORIGMARK;
- *++MARK = *SP;
+ if (SP > MARK)
+ *++MARK = *SP;
+ else
+ *++MARK = &PL_sv_undef;
SP = MARK;
}
}