mirror of
https://github.com/exoticorn/microw8.git
synced 2026-01-20 19:26:43 +01:00
add support to ignore empty memory section when packing
This commit is contained in:
@@ -220,6 +220,11 @@ impl<'a> ParsedModule<'a> {
|
||||
validate_table_section(reader)?;
|
||||
table_section = Some(Section::new(range, ()));
|
||||
}
|
||||
Payload::MemorySection(reader) => {
|
||||
if reader.get_count() != 0 {
|
||||
bail!("Found non-empty MemorySection. Memory has to be imported!");
|
||||
}
|
||||
}
|
||||
Payload::ElementSection(mut reader) => {
|
||||
let mut elements = Vec::with_capacity(reader.get_count() as usize);
|
||||
for _ in 0..reader.get_count() {
|
||||
|
||||
Reference in New Issue
Block a user