diff --git a/lib/package.wasm b/lib/package.wasm index bb0e229..1f57d57 100644 Binary files a/lib/package.wasm and b/lib/package.wasm differ diff --git a/lib/virtual_adapter.debug.wasm b/lib/virtual_adapter.debug.wasm index 1e78cf5..976eacb 100755 Binary files a/lib/virtual_adapter.debug.wasm and b/lib/virtual_adapter.debug.wasm differ diff --git a/lib/virtual_adapter.wasm b/lib/virtual_adapter.wasm index 6573579..33a63a2 100755 Binary files a/lib/virtual_adapter.wasm and b/lib/virtual_adapter.wasm differ diff --git a/virtual-adapter/src/io.rs b/virtual-adapter/src/io.rs index 327b425..a6b4c00 100644 --- a/virtual-adapter/src/io.rs +++ b/virtual-adapter/src/io.rs @@ -338,7 +338,7 @@ impl StaticIndexEntry { ); let bytes = unsafe { slice::from_raw_parts(data, read_len) }; let vec = bytes.to_vec(); - unsafe { std::alloc::dealloc(data, Layout::from_size_align(1, 4).unwrap()) }; + unsafe { std::alloc::dealloc(data, Layout::from_size_align(read_len, 4).unwrap()) }; offset.set(offset.get() + read_len as u64); Ok(vec) }