fix bitmap_buffer() and bitmap_buffer_mut()

return a slice with the actual bitmap
size instead the entire buffer (which has the size of the actual shared
mmap file)
This commit is contained in:
Sergej Schumilo 2022-04-12 14:59:15 +02:00
parent 70bf7ad8e0
commit 520079290b

View File

@ -224,11 +224,11 @@ impl NyxProcess {
}
pub fn bitmap_buffer(&self) -> &[u8] {
self.process.bitmap
&self.process.bitmap[.. self.process.bitmap_size]
}
pub fn bitmap_buffer_mut(&mut self) -> &mut [u8] {
self.process.bitmap
&mut self.process.bitmap[.. self.process.bitmap_size]
}
pub fn bitmap_buffer_size(&self) -> usize {