Re: Perl bug with "delete" on arrays
Abhijit Menon-Sen [Fri, 13 Jul 2001 03:04:25 +0000 (08:04 +0530)]
Message-ID: <20010713030425.A5669@lustre.dyn.wiw.org>

p4raw-id: //depot/perl@11329

av.c

diff --git a/av.c b/av.c
index 456a21e..8a4f855 100644 (file)
--- 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);