Skip to content

Commit

Permalink
fix: target-source in pop_cnt()
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouwfang committed Oct 25, 2024
1 parent dbbc1d1 commit 1d7e25c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/interpreter/src/valid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,9 @@ impl SideTable {
fn pop_cnt(source: SideTableBranch, target: SideTableBranch) -> MResult<u32, Check> {
let source = source.stack;
let target = target.stack;
let Some(delta) = source.checked_sub(target) else {
let Some(delta) = target.checked_sub(source) else {
#[cfg(feature = "debug")]
eprintln!("side-table negative stack delta {source} < {target}");
eprintln!("side-table negative stack delta {target} < {source}");
return Err(unsupported(if_debug!(Unsupported::SideTable)));
};
u32::try_from(delta).map_err(|_| {
Expand Down

0 comments on commit 1d7e25c

Please sign in to comment.