From ba55c0770ba98705059811645553b0e496ecd33f Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Tue, 11 Oct 2011 21:21:37 -0500 Subject: [PATCH] [libpng15] Use PNG_CSTRING_FROM_CHUNK macro with png_debug2() in pngwutil.c --- pngwutil.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pngwutil.c b/pngwutil.c index 062993a63..8340d382e 100644 --- a/pngwutil.c +++ b/pngwutil.c @@ -92,8 +92,10 @@ png_write_chunk_header(png_structp png_ptr, png_uint_32 chunk_name, { png_byte buf[8]; - png_debug2(0, "Writing %s chunk, length = %lu", chunk_name, - (unsigned long)length); +#ifdef PNG_DEBUG + PNG_CSTRING_FROM_CHUNK(buf, chunk_name); + png_debug2(0, "Writing %s chunk, length = %lu", buf, (unsigned long)length); +#endif if (png_ptr == NULL) return;