This commit is contained in:
bendn 2024-01-23 20:42:18 +07:00
parent d5d7b57e95
commit 33e55b5ab5
No known key found for this signature in database
GPG key ID: 0D9D3A2A3B2A93D6

View file

@ -225,7 +225,7 @@ impl<U: AsRef<[u8]>> OverlayAt<Image<U, 3>> for uninit::Image<u8, 3> {
..((j + y as usize) * self.width() as usize + x as usize + (with.width() as usize))
* 3;
// <= because ".." range
debug_assert!(o_x.end <= self.buffer().as_ref().len());
// debug_assert!(o_x.end <= self.buffer().as_ref().len());
debug_assert!(i_x.end <= with.buffer().as_ref().len());
// SAFETY: we are in ⬜!
let b = unsafe { with.buffer.as_ref().get_unchecked(i_x) };