summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gif.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gif.c b/src/gif.c
index aeb70f2..84d4209 100644
--- a/src/gif.c
+++ b/src/gif.c
@@ -525,7 +525,7 @@ static nsgif_error nsgif__decode_simple(
uint32_t *restrict frame_data,
uint32_t *restrict colour_table)
{
- uint32_t pixels = gif->info.width * height;
+ uint32_t pixels;
uint32_t written = 0;
nsgif_error ret = NSGIF_OK;
lzw_result res;
@@ -550,6 +550,7 @@ static nsgif_error nsgif__decode_simple(
}
frame_data += (offset_y * gif->info.width);
+ pixels = gif->info.width * height;
while (pixels > 0) {
res = lzw_decode_map(gif->lzw_ctx,