From e795b37a42d59216bc5957e8aa1aab9f541ac81e Mon Sep 17 00:00:00 2001 From: Robin Freyler Date: Tue, 31 Jan 2023 14:37:57 +0100 Subject: [PATCH] fix bug in Executor::visit_table_copy --- crates/wasmi/src/engine/executor.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/wasmi/src/engine/executor.rs b/crates/wasmi/src/engine/executor.rs index 5e1f37db1f..2c2ba60ca6 100644 --- a/crates/wasmi/src/engine/executor.rs +++ b/crates/wasmi/src/engine/executor.rs @@ -751,9 +751,7 @@ impl<'ctx, 'engine, 'func> Executor<'ctx, 'engine, 'func> { let src = self.cache.get_table(self.ctx, src); if Table::eq(&dst, &src) { // Copy within the same table: - let table = self - .ctx - .resolve_table_mut(&self.cache.get_table(self.ctx, TableIdx::default())); + let table = self.ctx.resolve_table_mut(&dst); table.copy_within(dst_index, src_index, len)?; } else { // Copy from one table to another table: