Fix emscripten test usage and fix error conditional

This commit is contained in:
Brandon Fish
2019-08-16 09:57:36 -06:00
parent d1c9ab3539
commit 57e621d307
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ pub fn get_emscripten_table_size(module: &Module) -> Result<(u32, Option<u32>),
}
pub fn get_emscripten_memory_size(module: &Module) -> Result<(Pages, Option<Pages>, bool), String> {
if module.info().imported_tables.len() == 0 {
if module.info().imported_memories.len() == 0 {
return Err("Emscripten requires at least one imported memory".to_string());
}
let (_, memory) = &module.info().imported_memories[ImportedMemoryIndex::new(0)];