Fix bug
This commit is contained in:
parent
ac26bc2839
commit
061359540b
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ impl TArray {
|
||||||
self.cap
|
self.cap
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn clear(&mut self, len: u32) {
|
pub fn clear(&mut self) {
|
||||||
if self.data_ptr != 0 && self.len > 0 {
|
if self.data_ptr != 0 && self.len > 0 {
|
||||||
let data = unsafe {
|
let data = unsafe {
|
||||||
std::slice::from_raw_parts_mut(self.data_ptr as *mut u8, self.len as usize)
|
std::slice::from_raw_parts_mut(self.data_ptr as *mut u8, self.len as usize)
|
||||||
|
|
Loading…
Reference in a new issue