summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-rpg/eternal-lands/files/eternal-lands-1.9.1-libpng.patch')
-rw-r--r--games-rpg/eternal-lands/files/eternal-lands-1.9.1-libpng.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/games-rpg/eternal-lands/files/eternal-lands-1.9.1-libpng.patch b/games-rpg/eternal-lands/files/eternal-lands-1.9.1-libpng.patch
new file mode 100644
index 000000000000..953ab8ffefd7
--- /dev/null
+++ b/games-rpg/eternal-lands/files/eternal-lands-1.9.1-libpng.patch
@@ -0,0 +1,23 @@
+--- elc.orig/misc.c
++++ elc/misc.c
+@@ -311,7 +311,7 @@ int IMG_SavePNG_RW (SDL_Surface *face, S
+ }
+
+ /* Set error handling. */
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ /* If we get here, we had a problem reading the file */
+ IMG_SetError("Error writing the PNG file");
+@@ -360,10 +360,7 @@ done:
+ if (row_pointers != NULL)
+ free (row_pointers);
+
+- if (info_ptr != NULL && info_ptr->palette != NULL)
+- free (info_ptr->palette);
+-
+- png_destroy_write_struct (&png_ptr, (png_infopp)NULL);
++ png_destroy_write_struct (&png_ptr, &info_ptr);
+
+ return result;
+ }