Fix rewrite GIF to actually match browser behavior

This commit is contained in:
FooIbar committed 2024-11-20 14:51:38 +08:00
1 parent 86a1e405b9
commit 897a56fa4a
1 file changed
+1 -1
+1 -1
View File
@@ -37,7 +37,7 @@ static void doRewrite(byte *addr, size_t size) {
byte *end = addr + i + 4;
if (end[4] != 0) continue;
int frameDelay = end[2] << 8 | end[1];
if (frameDelay > MINIMUM_FRAME_DELAY)
if (frameDelay >= MINIMUM_FRAME_DELAY)
break; // Quit if the first block looks normal, for performance
end[1] = DEFAULT_FRAME_DELAY;
end[2] = 0;