projects
/
p5sagit/p5-mst-13.2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
[perl #29127] scalar delete of empty slice returned garbage
[p5sagit/p5-mst-13.2.git]
/
pp.c
diff --git
a/pp.c
b/pp.c
index
a3e56d3
..
4ce7867
100644
(file)
--- 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;
}
}