summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mg.c b/mg.c
index 0a6878af08..e49d221009 100644
--- a/mg.c
+++ b/mg.c
@@ -1082,8 +1082,8 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
sv_setpvn(sv, WARN_ALLstring, WARNsize);
}
else {
- sv_setpvn(sv, (char *) (PL_compiling.cop_warnings + 1),
- *PL_compiling.cop_warnings);
+ sv_setpvn(sv, PL_compiling.cop_warnings,
+ RCPV_LEN(PL_compiling.cop_warnings));
}
}
break;