fix 653 panic in memoryDescriptor

This commit is contained in:
Patrick Ventuzelo
2019-09-17 17:42:06 +02:00
parent 90dfb0f7a7
commit c660aa9fce
4 changed files with 34 additions and 21 deletions

View File

@ -473,11 +473,7 @@ impl EmscriptenGlobals {
let (memory_min, memory_max, shared) = get_emscripten_memory_size(&module)?;
// Memory initialization
let memory_type = MemoryDescriptor {
minimum: memory_min,
maximum: memory_max,
shared: shared,
};
let memory_type = MemoryDescriptor::new(memory_min, memory_max, shared)?;
let memory = Memory::new(memory_type).unwrap();
let table_type = TableDescriptor {