mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-19 03:41:22 +00:00
Use minimum limit as initial table size (#196)
This commit is contained in:
committed by
Mackenzie Clark
parent
a6d72bdec9
commit
c9969f269c
@ -53,10 +53,7 @@ impl AnyfuncTable {
|
||||
desc: TableDescriptor,
|
||||
local: &mut vm::LocalTable,
|
||||
) -> Result<Box<Self>, CreationError> {
|
||||
let initial_table_backing_len = match desc.maximum {
|
||||
Some(max) => max,
|
||||
None => desc.minimum,
|
||||
} as usize;
|
||||
let initial_table_backing_len = desc.minimum as usize;
|
||||
|
||||
let mut storage = Box::new(AnyfuncTable {
|
||||
backing: vec![vm::Anyfunc::null(); initial_table_backing_len],
|
||||
|
Reference in New Issue
Block a user