From a90cf79fcac7c8b56ee5301752938aa1d2e42609 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Mon, 18 Oct 2021 07:41:32 +0000 Subject: [PATCH] Fix Ethereum non-compliance in JUMPI --- core/src/eval/misc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/eval/misc.rs b/core/src/eval/misc.rs index db9306e48..f3627b722 100644 --- a/core/src/eval/misc.rs +++ b/core/src/eval/misc.rs @@ -126,9 +126,9 @@ pub fn jump(state: &mut Machine) -> Control { pub fn jumpi(state: &mut Machine) -> Control { pop_u256!(state, dest); pop!(state, value); - let dest = as_usize_or_fail!(dest, ExitError::InvalidJump); if value != H256::zero() { + let dest = as_usize_or_fail!(dest, ExitError::InvalidJump); if state.valids.is_valid(dest) { Control::Jump(dest) } else {