From: Chip Salzenberg Date: Mon, 24 Mar 1997 15:51:51 +0000 (+1200) Subject: Fix assignment from magic SV that becomes a glob X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=973f89ab54aee31638a55cc8c998627da46e5534;p=p5sagit%2Fp5-mst-13.2.git Fix assignment from magic SV that becomes a glob --- diff --git a/sv.c b/sv.c index f8b1904..33b72ff 100644 --- a/sv.c +++ b/sv.c @@ -1925,10 +1925,16 @@ register SV *sstr; /* FALL THROUGH */ default: + if (SvGMAGICAL(sstr)) { + mg_get(sstr); + if (SvTYPE(sstr) != stype) { + stype = SvTYPE(sstr); + if (stype == SVt_PVGV && dtype <= SVt_PVGV) + goto glob_assign; + } + } if (dtype < stype) sv_upgrade(dstr, stype); - if (SvGMAGICAL(sstr)) - mg_get(sstr); } sflags = SvFLAGS(sstr);