From 15a867f05f63c65359b0470f89e047da9571717c Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Mon, 18 Oct 2021 09:48:06 +0200 Subject: [PATCH] Fix Ethereum non-compliance in JUMPI (#67) --- 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 {