From: Rudolf Polzer Date: Mon, 23 Jan 2012 16:25:22 +0000 (+0100) Subject: fix deprecation with libpng 1.4 X-Git-Tag: xonotic-v0.6.0~25 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7bd87de737fc55b27f68f764e24243cbfba6a2ea;p=xonotic%2Fnetradiant.git fix deprecation with libpng 1.4 --- diff --git a/tools/quake3/q3map2/image.c b/tools/quake3/q3map2/image.c index 7ce08aaa..4f0a87db 100644 --- a/tools/quake3/q3map2/image.c +++ b/tools/quake3/q3map2/image.c @@ -177,10 +177,9 @@ static void LoadPNGBuffer( byte *buffer, int size, byte **pixels, int *width, in pb.size = size; pb.offset = 0; png_set_read_fn( png, &pb, PNGReadData ); - png->io_ptr = &pb; /* hack! */ /* set error longjmp */ - if( setjmp( png->jmpbuf ) ) + if( setjmp( png_jmpbuf(png) ) ) { Sys_Printf( "WARNING: An error occurred reading PNG image\n" ); png_destroy_read_struct( &png, &info, &end );