diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2011-03-02 21:09:28 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2011-03-02 21:09:28 +0000 |
commit | 6c758cd298f9641d1b81ee7fc44c70ececd4b275 (patch) | |
tree | 52a15de8fb3279e05db7f0110ad8acba2a849914 | |
parent | 9e1916ad61b8929393956f3263e8452c4c007b03 (diff) | |
download | netsurf-6c758cd298f9641d1b81ee7fc44c70ececd4b275.tar.gz netsurf-6c758cd298f9641d1b81ee7fc44c70ececd4b275.tar.bz2 |
Cast unsigned gif coords to signed, for comparison.
svn path=/trunk/netsurf/; revision=11892
-rw-r--r-- | image/gif.c | 14 |
1 files changed, 8 insertions, 6 deletions
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; |