summaryrefslogtreecommitdiff
path: root/community/irrlicht/irrlicht-1.7.2-libpng15.patch
blob: a1426bf2907b3ad2107cff8c52f347b274612e6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
--- source/Irrlicht/CImageLoaderPNG.cpp
+++ source/Irrlicht/CImageLoaderPNG.cpp
@@ -28,7 +28,7 @@
 static void png_cpexcept_error(png_structp png_ptr, png_const_charp msg)
 {
 	os::Printer::log("PNG FATAL ERROR", msg, ELL_ERROR);
-	longjmp(png_ptr->jmpbuf, 1);
+	longjmp(png_jmpbuf(png_ptr), 1);
 }
 
 // PNG function for file reading
@@ -37,7 +37,7 @@
 	png_size_t check;
 
 	// changed by zola {
-	io::IReadFile* file=(io::IReadFile*)png_ptr->io_ptr;
+	io::IReadFile* file=(io::IReadFile*)png_get_io_ptr(png_ptr);
 	check=(png_size_t) file->read((void*)data,(u32)length);
 	// }
 
--- source/Irrlicht/CImageWriterPNG.cpp
+++ source/Irrlicht/CImageWriterPNG.cpp
@@ -35,7 +35,7 @@
 static void png_cpexcept_error(png_structp png_ptr, png_const_charp msg)
 {
 	os::Printer::log("PNG FATAL ERROR", msg, ELL_ERROR);
-	longjmp(png_ptr->jmpbuf, 1);
+	longjmp(png_jmpbuf(png_ptr), 1);
 }
 
 // PNG function for file writing
@@ -43,7 +43,7 @@
 {
 	png_size_t check;
 
-	io::IWriteFile* file=(io::IWriteFile*)png_ptr->io_ptr;
+	io::IWriteFile* file=(io::IWriteFile*)png_get_io_ptr(png_ptr);
 	check=(png_size_t) file->write((const void*)data,(u32)length);
 
 	if (check != length)