summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
Diffstat (limited to 'av.c')
-rw-r--r--av.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/av.c b/av.c
index 456a21e02d..8a4f855645 100644
--- a/av.c
+++ b/av.c
@@ -765,6 +765,7 @@ Perl_av_delete(pTHX_ AV *av, I32 key, I32 flags)
else {
sv = AvARRAY(av)[key];
if (key == AvFILLp(av)) {
+ AvARRAY(av)[key] = &PL_sv_undef;
do {
AvFILLp(av)--;
} while (--key >= 0 && AvARRAY(av)[key] == &PL_sv_undef);