oops, reinstate patch chunks lost in previous
This commit is contained in:
parent
a5bcb4ccdc
commit
07a0cc599f
@ -1,10 +1,31 @@
|
||||
$OpenBSD: patch-wrlib_gif_c,v 1.2 2015/03/28 17:23:23 sthen Exp $
|
||||
$OpenBSD: patch-wrlib_gif_c,v 1.3 2015/03/29 10:44:55 sthen Exp $
|
||||
|
||||
handle giflib 5.1+
|
||||
handle giflib 5.0+
|
||||
|
||||
--- wrlib/gif.c.orig Sat Mar 28 17:16:05 2015
|
||||
+++ wrlib/gif.c Sat Mar 28 17:16:14 2015
|
||||
@@ -80,7 +80,7 @@ RLoadGIF(RContext *context, char *file, int index)
|
||||
--- wrlib/gif.c.orig Tue Oct 12 19:21:01 2004
|
||||
+++ wrlib/gif.c Sun Mar 29 11:44:15 2015
|
||||
@@ -49,6 +49,7 @@ RLoadGIF(RContext *context, char *file, int index)
|
||||
GifPixelType *buffer = NULL;
|
||||
int i, j, k;
|
||||
int width, height;
|
||||
+ int giferr = 0;
|
||||
GifRecordType recType;
|
||||
ColorMapObject *colormap;
|
||||
unsigned char rmap[256];
|
||||
@@ -61,10 +62,10 @@ RLoadGIF(RContext *context, char *file, int index)
|
||||
/* default error message */
|
||||
RErrorCode = RERR_BADINDEX;
|
||||
|
||||
- gif = DGifOpenFileName(file);
|
||||
+ gif = DGifOpenFileName(file, &giferr);
|
||||
|
||||
if (!gif) {
|
||||
- switch (GifLastError()) {
|
||||
+ switch (giferr) {
|
||||
case D_GIF_ERR_OPEN_FAILED:
|
||||
RErrorCode = RERR_OPEN;
|
||||
break;
|
||||
@@ -79,7 +80,7 @@ RLoadGIF(RContext *context, char *file, int index)
|
||||
}
|
||||
|
||||
if (gif->SWidth<1 || gif->SHeight<1) {
|
||||
@ -13,7 +34,16 @@ handle giflib 5.1+
|
||||
RErrorCode = RERR_BADIMAGEFILE;
|
||||
return NULL;
|
||||
}
|
||||
@@ -224,7 +224,7 @@ did_not_get_any_errors:
|
||||
@@ -202,7 +203,7 @@ RLoadGIF(RContext *context, char *file, int index)
|
||||
/* yuck! */
|
||||
goto did_not_get_any_errors;
|
||||
giferr:
|
||||
- switch (GifLastError()) {
|
||||
+ switch (gif->Error) {
|
||||
case D_GIF_ERR_OPEN_FAILED:
|
||||
RErrorCode = RERR_OPEN;
|
||||
break;
|
||||
@@ -223,7 +224,7 @@ did_not_get_any_errors:
|
||||
free(buffer);
|
||||
|
||||
if (gif)
|
||||
|
Loading…
Reference in New Issue
Block a user