From dbeb242fb2f312bdc5a8b59c427fff92afa5c32d Mon Sep 17 00:00:00 2001 From: Dennis Ranke Date: Mon, 20 Mar 2023 23:08:42 +0100 Subject: [PATCH] add support for br_table instruction when packing cart --- uw8-tool/src/pack.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/uw8-tool/src/pack.rs b/uw8-tool/src/pack.rs index b941e0a..b3e0d8d 100644 --- a/uw8-tool/src/pack.rs +++ b/uw8-tool/src/pack.rs @@ -767,7 +767,10 @@ fn remap_function( De::End => En::End, De::Br { relative_depth } => En::Br(relative_depth), De::BrIf { relative_depth } => En::BrIf(relative_depth), - De::BrTable { .. } => todo!(), + De::BrTable { targets } => En::BrTable( + targets.targets().collect::, _>>()?.into(), + targets.default(), + ), De::Return => En::Return, De::Call { function_index } => En::Call( *function_map