diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-08-28 18:34:22 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-08-28 22:26:14 -0700 |
commit | 031c6d827a20d62a99481765d8e1b1686025aa2b (patch) | |
tree | d55bdd0a6a560c8ce05dd07acbfafe9c3e6a5260 /mg.c | |
parent | a600f7e6b3c2fb66bd73b5e0893bfe1a09f26db7 (diff) | |
download | perl-031c6d827a20d62a99481765d8e1b1686025aa2b.tar.gz |
Make vivify_defelem allow &PL_sv_undef array entries
This is something I failed to change in commit ce0d59f. I don’t know
of a way to trigger this in pure-Perl code, hence the use of XS in
the test. It did show up in pure-Perl code due to a bug fixed by the
previous commit.
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2381,7 +2381,7 @@ Perl_vivify_defelem(pTHX_ SV *sv) LvTARG(sv) = NULL; /* array can't be extended */ else { SV* const * const svp = av_fetch(av, LvSTARGOFF(sv), TRUE); - if (!svp || (value = *svp) == &PL_sv_undef) + if (!svp || !(value = *svp)) Perl_croak(aTHX_ PL_no_aelem, LvSTARGOFF(sv)); } } |