From 520079290b71ba5909deb6e8107da8d59cb24596 Mon Sep 17 00:00:00 2001 From: Sergej Schumilo Date: Tue, 12 Apr 2022 14:59:15 +0200 Subject: [PATCH] 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) --- libnyx/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libnyx/src/lib.rs b/libnyx/src/lib.rs index b976599..50ae874 100644 --- a/libnyx/src/lib.rs +++ b/libnyx/src/lib.rs @@ -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 {