From b6d70499bfbc5f99b6330c418bffb9f1797dc00b Mon Sep 17 00:00:00 2001 From: alex8664 Date: Sat, 31 Mar 2012 17:33:33 +0400 Subject: [PATCH] This is fix for failure of compilation on new libpng --- plugins/imagepng/plugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/imagepng/plugin.cpp b/plugins/imagepng/plugin.cpp index 9efdd2f5..784500f8 100644 --- a/plugins/imagepng/plugin.cpp +++ b/plugins/imagepng/plugin.cpp @@ -104,7 +104,7 @@ void user_warning_fn( png_structp png_ptr, png_const_charp warning_msg ){ void user_error_fn( png_structp png_ptr, png_const_charp error_msg ){ g_FuncTable.m_pfnSysPrintf( "libpng error: %s\n", error_msg ); - longjmp( png_ptr->jmpbuf, 0 ); + longjmp( png_jmpbuf(png_ptr), 0 ); } void user_read_data( png_structp png_ptr, png_bytep data, png_uint_32 length ){ @@ -153,9 +153,9 @@ void LoadImage( const char *filename, unsigned char **pic, int *width, int *heig } // configure the read function - png_set_read_fn( png_ptr, ( voidp ) & p_fbuffer, ( png_rw_ptr ) & user_read_data ); + png_set_read_fn( png_ptr, ( void * ) & p_fbuffer, ( png_rw_ptr ) & user_read_data ); - if ( setjmp( png_ptr->jmpbuf ) ) { + if ( setjmp( png_jmpbuf(png_ptr) ) ) { png_destroy_read_struct( &png_ptr, &info_ptr, &end_info ); if ( *pic ) {