mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Added PNG generation tool, fixed unitialized pointer in
simpleover. Also added a comment to png.h pointing out that the pointer must be set to NULL! (simpleover crashes with any slightly complex command lines without this fix.)
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
cde3078963
commit
0f12df19a1
@@ -210,6 +210,7 @@ create_sprite(struct sprite *sprite, int *argc, const char ***argv)
|
||||
png_image image;
|
||||
|
||||
image.version = PNG_IMAGE_VERSION;
|
||||
image.opaque = NULL;
|
||||
|
||||
if (png_image_begin_read_from_file(&image, (*argv)[0]))
|
||||
{
|
||||
@@ -540,6 +541,8 @@ int main(int argc, const char **argv)
|
||||
}
|
||||
|
||||
image.version = PNG_IMAGE_VERSION;
|
||||
image.opaque = NULL;
|
||||
|
||||
if (png_image_begin_read_from_file(&image, argv[1]))
|
||||
{
|
||||
png_bytep buffer;
|
||||
|
||||
Reference in New Issue
Block a user