summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mg.c b/mg.c
index 1e5c99480b..06140994cf 100644
--- a/mg.c
+++ b/mg.c
@@ -373,6 +373,7 @@ Perl_magic_regdatum_get(pTHX_ SV *sv, MAGIC *mg)
i = t;
else /* @- */
i = s;
+ SvREADONLY_on(sv);
sv_setiv(sv,i);
}
}