]> git.vpit.fr Git - perl/modules/Variable-Magic.git/commitdiff
Simplify vmg_pp_propagate_errsv() so that ERRSV is not used as a lvalue
authorVincent Pit <vince@profvince.com>
Tue, 10 Mar 2015 20:01:30 +0000 (17:01 -0300)
committerVincent Pit <vince@profvince.com>
Tue, 10 Mar 2015 20:01:39 +0000 (17:01 -0300)
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;
  }