Skip to content

Commit 51b2959

Browse files
committed
fix reachability of if(false) with missing else
1 parent 68ce752 commit 51b2959

File tree

1 file changed

+1
-1
lines changed
  • crates/wasmi/src/engine/translator/func2

1 file changed

+1
-1
lines changed

crates/wasmi/src/engine/translator/func2/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ impl FuncTranslator {
972972
let IfReachability::Both { else_label } = frame.reachability() else {
973973
let is_end_reachable = match frame.reachability() {
974974
IfReachability::OnlyThen => self.reachable,
975-
IfReachability::OnlyElse => false,
975+
IfReachability::OnlyElse => true,
976976
IfReachability::Both { .. } => unreachable!(),
977977
};
978978
return self.translate_end_if_or_else_only(frame, is_end_reachable);

0 commit comments

Comments
 (0)