From 5b48bdd72b8c604d12c1f90bc24ad50abacbe046 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 15 Apr 2024 14:57:36 +0200 Subject: [PATCH] Update instructions.go --- core/vm/instructions.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 7e7d92e2e3..0729d3a7f7 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -891,17 +891,15 @@ func makePush(size uint64, pushByteSize int) executionFunc { return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { var ( codeLen = len(scope.Contract.Code) - startMin = min(codeLen, int(*pc+1)) - endMin = min(startMin+pushByteSize, codeLen) + start = min(codeLen, int(*pc+1)) + end = min(start+pushByteSize, codeLen) ) - scope.Stack.push(new(uint256.Int).SetBytes( common.RightPadBytes( - scope.Contract.Code[startMin:endMin], + scope.Contract.Code[start:end], pushByteSize, )), ) - *pc += size return nil, nil }