mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-06-27 13:41:58 +00:00
extend -> resize
This commit is contained in:
@ -90,7 +90,7 @@ impl MemoryInstance {
|
|||||||
match calculate_memory_size(old_size, pages, self.maximum_size) {
|
match calculate_memory_size(old_size, pages, self.maximum_size) {
|
||||||
None => Ok(u32::MAX),
|
None => Ok(u32::MAX),
|
||||||
Some(new_size) => {
|
Some(new_size) => {
|
||||||
buffer.extend(vec![0; (new_size - old_size) as usize]);
|
buffer.resize(new_size as usize, 0);
|
||||||
Ok(old_size / LINEAR_MEMORY_PAGE_SIZE)
|
Ok(old_size / LINEAR_MEMORY_PAGE_SIZE)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user