fixed compilation issue with libpng 1.4.x

This commit is contained in:
ekeeke31 2010-04-13 12:21:21 +00:00
parent 0794c4a5d6
commit 3339a4c467

View File

@ -963,12 +963,14 @@ gx_texture *gxTextureOpenPNG(const u8 *png_data, FILE *png_file)
return NULL;
}
if (!png_check_sig (magic, 8))
if (!png_sig_cmp (magic, 0, 8))
{
if (fread (magic, 1, 8, png_file) != 8)
{
png_destroy_read_struct(&png_ptr,&info_ptr,NULL);
return NULL;
}
}
/* set IO callback for read function */
png_init_io (png_ptr, png_file);