Off by one...

This commit is contained in:
2025-07-14 18:09:21 +02:00
parent c7decddcc9
commit c9d7ffdad2

View File

@ -119,7 +119,7 @@ fn image_to_offimage_buffer(image: GrayAlphaImage) -> eyre::Result<Box<[u8; IOCT
);
// Iterate over pixels and copy them into `buf`.
for (i, pixel) in (0..buf.len()).rev().zip(image.chunks_exact(2)) {
for (i, pixel) in (0..buf.len() - 1).rev().zip(image.chunks_exact(2)) {
let &[gray, alpha] = pixel else {
unreachable!()
};