summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@atlantic.net>1997-01-28 23:11:49 +1200
committerChip Salzenberg <chip@atlantic.net>1997-01-29 18:11:00 +1200
commite3c19b7bc9a0745aef2775aa2cf9897de45593c4 (patch)
treec7af681d1196bea2384d361840a2fa8fb8e8c9b2 /mg.c
parent8ca41e400e258c6348e47a8adc6cf6570de760a8 (diff)
downloadperl-e3c19b7bc9a0745aef2775aa2cf9897de45593c4.tar.gz
Don't warn on C<$\ = undef>
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mg.c b/mg.c
index 1359c91775..c42667f70a 100644
--- a/mg.c
+++ b/mg.c
@@ -1326,7 +1326,12 @@ MAGIC* mg;
case '\\':
if (ors)
Safefree(ors);
- ors = savepv(SvPV(sv,orslen));
+ if (SvOK(sv) || SvGMAGICAL(sv))
+ ors = savepv(SvPV(sv,orslen));
+ else {
+ ors = Nullch;
+ orslen = 0;
+ }
break;
case ',':
if (ofs)