diff --git a/lib/reader/src/parser.rs b/lib/reader/src/parser.rs index 3c9cb4c56f..bef37a86fd 100644 --- a/lib/reader/src/parser.rs +++ b/lib/reader/src/parser.rs @@ -233,11 +233,12 @@ impl<'a> Context<'a> { // Allocate a new jump table. fn add_jt(&mut self, jt: JumpTable, data: JumpTableData, loc: Location) -> ParseResult<()> { + self.map.def_jt(jt, loc)?; while self.function.jump_tables.next_key().index() <= jt.index() { self.function.create_jump_table(JumpTableData::new()); } self.function.jump_tables[jt] = data; - self.map.def_jt(jt, loc) + Ok(()) } // Resolve a reference to a jump table.