This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
minor code simplification made possible by change #30627
[perl5.git] / mg.c
diff --git a/mg.c b/mg.c
index 6966f9c..c603073 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -2002,13 +2002,11 @@ Perl_magic_settaint(pTHX_ SV *sv, MAGIC *mg)
 {
     dVAR;
     PERL_UNUSED_ARG(sv);
-    /* update taint status unless we're restoring at scope exit */
-    if (PL_localizing != 2) {
-       if (PL_tainted)
-           mg->mg_len |= 1;
-       else
-           mg->mg_len &= ~1;
-    }
+    /* update taint status */
+    if (PL_tainted)
+       mg->mg_len |= 1;
+    else
+       mg->mg_len &= ~1;
     return 0;
 }