Skip to content

Commit e429247

Browse files
dos1SiegeLord
authored andcommitted
image: png: Fix type mismatch in png_rw_ptr function type
The length argument has been (png_)size_t since 1997 (libpng 0.95).
1 parent 5a70137 commit e429247

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

addons/image/png.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static void user_error_fn(png_structp png_ptr, png_const_charp message)
5858
* Custom read function to use Allegro packfile routines,
5959
* rather than C streams (so we can read from datafiles!)
6060
*/
61-
static void read_data(png_structp png_ptr, png_bytep data, png_uint_32 length)
61+
static void read_data(png_structp png_ptr, png_bytep data, size_t length)
6262
{
6363
ALLEGRO_FILE *f = (ALLEGRO_FILE *)png_get_io_ptr(png_ptr);
6464
if ((png_uint_32) al_fread(f, data, length) != length)
@@ -436,7 +436,7 @@ ALLEGRO_BITMAP *_al_load_png(const char *filename, int flags)
436436
* Custom write function to use Allegro packfile routines,
437437
* rather than C streams.
438438
*/
439-
static void write_data(png_structp png_ptr, png_bytep data, png_uint_32 length)
439+
static void write_data(png_structp png_ptr, png_bytep data, size_t length)
440440
{
441441
ALLEGRO_FILE *f = (ALLEGRO_FILE *)png_get_io_ptr(png_ptr);
442442
if ((png_uint_32) al_fwrite(f, data, length) != length)

0 commit comments

Comments
 (0)