]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - Magic.xs
Simplify vmg_pp_propagate_errsv() so that ERRSV is not used as a lvalue
[perl/modules/Variable-Magic.git] / Magic.xs
index 61bc9e092aa5191959e39662a7c83e332528c444..341950240c2934e870148a23b6f4a05304372f71 100644 (file)
--- a/Magic.xs
+++ b/Magic.xs
@@ -1375,8 +1375,8 @@ STATIC OP *vmg_pp_propagate_errsv(pTHX) {
  SVOP *o = cSVOPx(PL_op);
 
  if (o->op_sv) {
-  SvREFCNT_dec(ERRSV);
-  ERRSV    = o->op_sv;
+  sv_setsv(ERRSV, o->op_sv);
+  SvREFCNT_dec(o->op_sv);
   o->op_sv = NULL;
  }