diff --git a/evm_loader/program/src/evm/mod.rs b/evm_loader/program/src/evm/mod.rs index f81fe808a..ac0c38580 100644 --- a/evm_loader/program/src/evm/mod.rs +++ b/evm_loader/program/src/evm/mod.rs @@ -374,10 +374,10 @@ impl Machine { ExitStatus::Return(value) } else { loop { - step += 1; - if step > step_limit { + if step >= step_limit { break ExitStatus::StepLimit; } + step += 1; let opcode = self.execution_code.get_or_default(self.pc);