mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Updated to zesterer suggestion
This commit is contained in:
parent
ea1efd1ce1
commit
7f20c78ce6
@ -44,6 +44,6 @@ static mut BUFFERS: Vec<u8> = Vec::new();
|
||||
/// This function should never be used only intented to by used by the host
|
||||
#[no_mangle]
|
||||
pub unsafe fn wasm_prepare_buffer(size: i32) -> i32 {
|
||||
BUFFERS = Vec::<u8>::with_capacity(size as usize);
|
||||
BUFFERS = vec![0u8; size as usize];
|
||||
BUFFERS.as_ptr() as i32
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user