|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
c++.beta - dmc bug in png lib
Walter, I think this is a dmc bug: I found it within the wxWidgets
library when a new version of png was introduced.
This is a reduced version of pngrutil.c
I'm compiling it with
dmc -mn -c -opngrutil.obj -g -o+none -D_WIN32_WINNT=0x0400
-I..\..\src\zlib pngrutil.c
please let me know if you see the bug too, or if i can provide any
further information
chris
/* pngrutil.c - utilities to read a PNG file
*
* Last changed in libpng 1.2.19 August 19, 2007
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42,
Inc.)
*
* This file contains routines that are only called from within
* libpng itself during the course of reading an image.
*/
#include "png.h"
png_charp /* PRIVATE */
png_decompress_chunk( png_structp png_ptr, int comp_type,
/* png_charp chunkdata, png_size_t
chunklength,
png_size_t prefix_size, png_size_t
*newlength */ )
{
int ret = 0;
if (ret != 1)
{
char umsg[52];
/* IF YOU REMOVE THIS COMMENT IT FAILS AT png_snprintf(umsg, 50,
"Unknown zTXt compression type %d", comp_type);
if (ret == 2)
png_snprintf(umsg, 52,
"Buffer error in compressed datastream in %s chunk",
png_ptr->chunk_name);
else if (ret == 3)
png_snprintf(umsg, 52,
"Data error in compressed datastream in %s chunk",
png_ptr->chunk_name);
else
png_snprintf(umsg, 52,
"Incomplete compressed datastream in %s chunk",
png_ptr->chunk_name);
png_warning(png_ptr, umsg);
*/
}
else /* if (comp_type != PNG_COMPRESSION_TYPE_BASE) */
{
char umsg[50];
png_snprintf(umsg, 50,
"Unknown zTXt compression type %d", comp_type);
png_warning(png_ptr, umsg);
}
}
Oct 06 2007
chris elliott wrote:Walter, I think this is a dmc bug: I found it within the wxWidgets library when a new version of png was introduced. Oct 11 2007
Walter Bright wrote:chris elliott wrote:Walter, I think this is a dmc bug: I found it within the wxWidgets library when a new version of png was introduced. Oct 25 2007
|