]> git.nihav.org Git - nihav.git/commitdiff
gif: accept files with last pixel not being encoded master
authorKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 4 Dec 2026 10:37:51 +0000 (11:37 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 4 Dec 2026 10:37:51 +0000 (11:37 +0100)
nihav-commonfmt/src/codecs/gif.rs

index 443f9227e8066e73e63eb018c01b9ac7e1c03535..7e939cb7f53a64b67ab7a1c3928de0aa7b21739a 100644 (file)
@@ -159,7 +159,7 @@ impl LZWState {
                 self.idx_bits += 1;
             }
         }
-        validate!(pos == dst.len());
+        validate!(pos == dst.len() || pos + 1 == dst.len());
         validate!(br.pos + 2 == src.len());
         Ok(())
     }