various bug fixes

This commit is contained in:
Jean-Philippe Bossuat
2025-06-10 12:55:34 +02:00
parent 113231da55
commit a673b84047
8 changed files with 95 additions and 57 deletions

View File

@@ -150,6 +150,10 @@ impl Scratch {
unsafe { &mut *(data as *mut [u8] as *mut Self) }
}
pub fn zero(&mut self){
self.data.fill(0);
}
pub fn available(&self) -> usize {
let ptr: *const u8 = self.data.as_ptr();
let self_len: usize = self.data.len();