summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-12-28 22:33:16 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-12-28 22:33:16 +0000
commit018f84777e1627fdb7641155b51d78ace8779de9 (patch)
treef824a5911e20497b553e939100dbe6b36314c51f /dump.c
parent323eb6b51efca422d3c0a8b789bae8a333db8627 (diff)
downloadperl-018f84777e1627fdb7641155b51d78ace8779de9.tar.gz
A small tweak on top of #18353: don't display mg_len bytes of
mg_ptr for PERL_MAGIC_utf8 because that's not what's there. p4raw-id: //depot/maint-5.8/perl@18359
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/dump.c b/dump.c
index 59e852960c..8127ba003d 100644
--- a/dump.c
+++ b/dump.c
@@ -866,9 +866,11 @@ Perl_do_magic_dump(pTHX_ I32 level, PerlIO *file, MAGIC *mg, I32 nest, I32 maxne
if (mg->mg_ptr) {
Perl_dump_indent(aTHX_ level, file, " MG_PTR = 0x%"UVxf, PTR2UV(mg->mg_ptr));
if (mg->mg_len >= 0) {
- SV *sv = newSVpvn("", 0);
- PerlIO_printf(file, " %s", pv_display(sv, mg->mg_ptr, mg->mg_len, 0, pvlim));
- SvREFCNT_dec(sv);
+ if (mg->mg_type != PERL_MAGIC_utf8) {
+ SV *sv = newSVpvn("", 0);
+ PerlIO_printf(file, " %s", pv_display(sv, mg->mg_ptr, mg->mg_len, 0, pvlim));
+ SvREFCNT_dec(sv);
+ }
}
else if (mg->mg_len == HEf_SVKEY) {
PerlIO_puts(file, " => HEf_SVKEY\n");