summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2022-02-26 16:09:17 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2022-02-26 17:39:49 +0000
commit4360a768898cc7a43715926e2e8040cb9748bead (patch)
tree3fa55d098147cf14afa9e71c45b3185a67ed336d
parentc800fec625521c9cb791d69933c8084e390c2bd0 (diff)
downloadlibnsgif-4360a768898cc7a43715926e2e8040cb9748bead.tar.gz
libnsgif-4360a768898cc7a43715926e2e8040cb9748bead.tar.bz2
GIF: Don't error for a final partial frame.
-rw-r--r--src/gif.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gif.c b/src/gif.c
index 3eebbd6..db99afd 100644
--- a/src/gif.c
+++ b/src/gif.c
@@ -1517,9 +1517,8 @@ nsgif_error nsgif_data_scan(
ret = nsgif__process_frame(gif, frames, false);
} while (gif->info.frame_count > frames);
- if (ret == NSGIF_ERR_END_OF_DATA &&
- gif->info.frame_count > 0) {
- ret = NSGIF_ERR_END_OF_FRAME;
+ if (ret == NSGIF_ERR_END_OF_DATA && gif->info.frame_count > 0) {
+ ret = NSGIF_OK;
}
return ret;