Skip to content

Commit

Permalink
Fix missing color cache update in lossless decoding fastpath (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
fintelia authored Oct 2, 2024
1 parent 4abddaf commit 7b2bbbc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lossless.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,10 @@ impl<R: BufRead> LosslessDecoder<R> {
data[index * 4 + i * 4..][..4].copy_from_slice(&value);
}

if let Some(color_cache) = huffman_info.color_cache.as_mut() {
color_cache.insert(value);
}

index += n;
continue;
}
Expand Down

0 comments on commit 7b2bbbc

Please sign in to comment.