Skip to content

Commit 7b2bbbc

Browse files
authored
Fix missing color cache update in lossless decoding fastpath (#114)
1 parent 4abddaf commit 7b2bbbc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lossless.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,10 @@ impl<R: BufRead> LosslessDecoder<R> {
512512
data[index * 4 + i * 4..][..4].copy_from_slice(&value);
513513
}
514514

515+
if let Some(color_cache) = huffman_info.color_cache.as_mut() {
516+
color_cache.insert(value);
517+
}
518+
515519
index += n;
516520
continue;
517521
}

0 commit comments

Comments
 (0)