From 6c758cd298f9641d1b81ee7fc44c70ececd4b275 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 2 Mar 2011 21:09:28 +0000 Subject: Cast unsigned gif coords to signed, for comparison. svn path=/trunk/netsurf/; revision=11892 --- image/gif.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'image/gif.c') diff --git a/image/gif.c b/image/gif.c index 8afe79485..7b8c2ec0c 100644 --- a/image/gif.c +++ b/image/gif.c @@ -293,24 +293,26 @@ void nsgif_animate(void *p) /* previous frame needed clearing: expand the redraw area to * cover it */ if (data.redraw.full_redraw) { - if (data.redraw.x > gif->frames[f - 1].redraw_x) { + if (data.redraw.x > + (int)(gif->frames[f - 1].redraw_x)) { data.redraw.width += data.redraw.x - gif->frames[f - 1].redraw_x; data.redraw.x = gif->frames[f - 1].redraw_x; } - if (data.redraw.y > gif->frames[f - 1].redraw_y) { + if (data.redraw.y > + (int)(gif->frames[f - 1].redraw_y)) { data.redraw.height += (data.redraw.y - gif->frames[f - 1].redraw_y); data.redraw.y = gif->frames[f - 1].redraw_y; } - if ((gif->frames[f - 1].redraw_x + + if ((int)(gif->frames[f - 1].redraw_x + gif->frames[f - 1].redraw_width) > (data.redraw.x + data.redraw.width)) data.redraw.width = gif->frames[f - 1].redraw_x - data.redraw.x + gif->frames[f - 1].redraw_width; - if ((gif->frames[f - 1].redraw_y + + if ((int)(gif->frames[f - 1].redraw_y + gif->frames[f - 1].redraw_height) > (data.redraw.y + data.redraw.height)) data.redraw.height = @@ -322,8 +324,8 @@ void nsgif_animate(void *p) } else { /* do advanced check */ if ((data.redraw.x == 0) && (data.redraw.y == 0) && - (data.redraw.width == gif->width) && - (data.redraw.height == gif->height)) { + (data.redraw.width == (int)(gif->width)) && + (data.redraw.height == (int)(gif->height))) { data.redraw.full_redraw = !gif->frames[f].opaque; } else { data.redraw.full_redraw = true; -- cgit v1.2.3