Skip to content

Commit 5a7e16c

Browse files
authored
Fix indexing for filling image regions with tivial huffman codes (#100)
1 parent 2910bf3 commit 5a7e16c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lossless.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ impl<R: BufRead> LosslessDecoder<R> {
509509
let value = [red as u8, code as u8, blue as u8, alpha as u8];
510510

511511
for i in 0..n {
512-
data[index + i * 4..][..4].copy_from_slice(&value);
512+
data[index * 4 + i * 4..][..4].copy_from_slice(&value);
513513
}
514514

515515
index += n;

0 commit comments

Comments
 (0)