summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-11-07 13:13:15 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-11-07 13:13:15 +0000
commit3b7551e2c18f4c0bb8a881904803f808d6296cc4 (patch)
tree4b264374a817560744ae6cdfa951afe7ac1f5cc1 /mg.c
parent14e4fe40502a3124a359f29afa1abf4e94a3a857 (diff)
parent009c130fc3ba16de26baf9bc4a9290f046a90258 (diff)
downloadperl-3b7551e2c18f4c0bb8a881904803f808d6296cc4.tar.gz
Integrate with Sarathy.
p4raw-id: //depot/cfgperl@4533
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mg.c b/mg.c
index 51d5c16111..2f7f8a647b 100644
--- a/mg.c
+++ b/mg.c
@@ -1714,8 +1714,10 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
case '\\':
if (PL_ors)
Safefree(PL_ors);
- if (SvOK(sv) || SvGMAGICAL(sv))
- PL_ors = savepv(SvPV(sv,PL_orslen));
+ if (SvOK(sv) || SvGMAGICAL(sv)) {
+ s = SvPV(sv,PL_orslen);
+ PL_ors = savepvn(s,PL_orslen);
+ }
else {
PL_ors = Nullch;
PL_orslen = 0;