This commit is contained in:
xavo95 2025-01-12 19:31:16 +01:00
parent 36e4b12934
commit b9893813f2
Signed by: xavo95
GPG key ID: CBF8ADED6DEBB783

View file

@ -43,7 +43,7 @@ impl TArray {
pub fn clear(&mut self, len: u32) -> Self {
if self.data_ptr != 0 && self.len > 0 {
let data = unsafe {
std::slice::from_raw_parts_mut(self.data_ptr as *mut u8, self.len)
std::slice::from_raw_parts_mut(self.data_ptr as *mut u8, self.len as usize)
};
data.fill(0);
self.len = 0;