Fixed CallIndirect not fetching correct arity
This commit is contained in:
parent
2b2e5b4012
commit
679ed0b961
@ -239,9 +239,10 @@ impl<'a> Body<'a> {
|
||||
Instruction::CallIndirect(i, t) => {
|
||||
let index = func.var_name_of(self.reg.pop(1));
|
||||
let name = format!("TABLE_LIST[{}][{}]", t, index);
|
||||
let arity = m.arity_of(*i as usize);
|
||||
let types = m.parent.type_section().unwrap().types();
|
||||
let arity = Arity::from_index(types, *i);
|
||||
|
||||
self.gen_call(&name, func, arity, w)
|
||||
self.gen_call(&name, func, &arity, w)
|
||||
}
|
||||
Instruction::Drop => {
|
||||
self.reg.pop(1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user