Skip to content

Commit

Permalink
Fix Ethereum non-compliance in JUMPI (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorpaas authored Oct 18, 2021
1 parent b632ef2 commit 15a867f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/eval/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 15a867f

Please # to comment.