MacOSX g++ setjmp fix from div0
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 11 Apr 2006 21:47:51 +0000 (21:47 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 11 Apr 2006 21:47:51 +0000 (21:47 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6266 d7cf8633-e32d-0410-b094-e92efae38249

image_png.c

index 94a2bd8..a5a23ad 100644 (file)
@@ -250,7 +250,11 @@ unsigned char *PNG_LoadImage (const unsigned char *raw, int filesize, int matchw
        // NOTE: this relies on jmp_buf being the first thing in the png structure
        // created by libpng! (this is correct for libpng 1.2.x)
 #ifdef __cplusplus
+#ifdef MACOSX
+       if (setjmp((int *)png))
+#else
        if (setjmp((__jmp_buf_tag *)png))
+#endif
 #else
        if (setjmp(png))
 #endif