diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-01 06:07:00 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-01 06:07:00 +0000 |
commit | d775746ed34297f91b6e0a289bb9a525d1b3ccba (patch) | |
tree | 3492b10aa2fa28617219efc8f52efeaa2ec37676 /mg.c | |
parent | d1edabcfc0953113eff6d4bda774297dc66644b9 (diff) | |
download | perl-d775746ed34297f91b6e0a289bb9a525d1b3ccba.tar.gz |
fix segfault on C<local ${^WARNING_BITS}>
p4raw-id: //depot/perl@5394
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1719,6 +1719,11 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) } else if (strEQ(mg->mg_ptr, "\027ARNING_BITS")) { if ( ! (PL_dowarn & G_WARN_ALL_MASK)) { + if (!SvPOK(sv) && PL_localizing) { + sv_setpvn(sv, WARN_NONEstring, WARNsize); + PL_compiling.cop_warnings = WARN_NONE; + break; + } if (memEQ(SvPVX(sv), WARN_ALLstring, WARNsize)) { PL_compiling.cop_warnings = WARN_ALL; PL_dowarn |= G_WARN_ONCE ; |