diff options
-rw-r--r-- | gifed/src/block/palette.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gifed/src/block/palette.rs b/gifed/src/block/palette.rs index 0dc1686..ea1ed0d 100644 --- a/gifed/src/block/palette.rs +++ b/gifed/src/block/palette.rs @@ -20,7 +20,7 @@ impl Palette { } pub fn lzw_code_size(&self) -> u8 { - let table_log = (self.table.len() as f32).log2() as u8; + let table_log = (self.table.len() as f32).log2().ceil() as u8; table_log.max(2) } |