From 5d2fffbfa09ed071652b0de57c94a2992ed23e5a Mon Sep 17 00:00:00 2001 From: Zhou Fang <33002388+zhou-w-fang@users.noreply.github.com> Date: Thu, 24 Oct 2024 22:38:37 -0700 Subject: [PATCH] fix: target-source in pop_cnt() --- crates/interpreter/src/valid.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/interpreter/src/valid.rs b/crates/interpreter/src/valid.rs index be814b4b..20b54636 100644 --- a/crates/interpreter/src/valid.rs +++ b/crates/interpreter/src/valid.rs @@ -459,9 +459,9 @@ impl SideTable { fn pop_cnt(source: SideTableBranch, target: SideTableBranch) -> MResult { 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(|_| {