From fa359952ebde452911c325bd6c091a11bff111b8 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 2 Mar 2022 12:28:25 +0000 Subject: Test: Default to single loop if loop count is zero. --- test/nsgif.c | 4 ++++ 1 file changed, 4 insertions(+) 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); } -- cgit v1.2.3