summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2022-03-02 12:28:25 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2022-03-02 12:28:25 +0000
commitfa359952ebde452911c325bd6c091a11bff111b8 (patch)
tree0a5aed69e1abb04ad4fa85aeb9573b7db0a98075 /test
parentb627abfbecaa7e18e2d6b6bb1f3b2ec2aae255ae (diff)
downloadlibnsgif-fa359952ebde452911c325bd6c091a11bff111b8.tar.gz
libnsgif-fa359952ebde452911c325bd6c091a11bff111b8.tar.bz2
Test: Default to single loop if loop count is zero.
Diffstat (limited to 'test')
-rw-r--r--test/nsgif.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/nsgif.c b/test/nsgif.c
index 796d34a..648d3d1 100644
--- a/test/nsgif.c
+++ b/test/nsgif.c
@@ -289,6 +289,10 @@ int main(int argc, char *argv[])
return EXIT_FAILURE;
}
+ if (nsgif_options.loops == 0) {
+ nsgif_options.loops = 1;
+ }
+
for (uint64_t i = 0; i < nsgif_options.loops; i++) {
decode((i == 0) ? ppm : NULL, nsgif_options.file, gif);
}