wasm_interp: fix bug in position of locals block

This commit is contained in:
Brian Carroll 2022-12-17 16:06:47 +00:00
parent b87cb69d94
commit 6beac8d56a
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0

View file

@ -567,7 +567,7 @@ impl<'a, I: ImportDispatcher> Instance<'a, I> {
self.blocks.push(Block {
ty: BlockType::Locals(fn_index),
vstack: self.value_stack.depth(),
vstack: self.value_stack.depth() - n_args,
});
let body_block_index = self.blocks.len();