From 4360a768898cc7a43715926e2e8040cb9748bead Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 26 Feb 2022 16:09:17 +0000 Subject: GIF: Don't error for a final partial frame. --- src/gif.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') 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; -- cgit v1.2.3