summaryrefslogtreecommitdiff
path: root/src/gif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gif.c')
-rw-r--r--src/gif.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gif.c b/src/gif.c
index 4fdaaac..d49cfe0 100644
--- a/src/gif.c
+++ b/src/gif.c
@@ -800,6 +800,9 @@ static nsgif_error nsgif__parse_extension_application(
(strncmp((const char *)data + 2, "NETSCAPE2.0", 11) == 0) &&
(data[13] == 0x03) && (data[14] == 0x01)) {
gif->info.loop_max = data[15] | (data[16] << 8);
+ if (gif->info.loop_max > 0) {
+ gif->info.loop_max++;
+ }
}
return NSGIF_OK;