diff --git a/core/vm/contract.go b/core/vm/contract.go index d7cbafcf7f..2f49c8f481 100644 --- a/core/vm/contract.go +++ b/core/vm/contract.go @@ -17,6 +17,7 @@ package vm import ( + "math" "math/big" "github.com/ethereum/go-ethereum/common" @@ -146,7 +147,7 @@ func (c *Contract) AsDelegate() *Contract { // GetOp returns the n'th element in the contract's byte array func (c *Contract) GetOp(n uint64) OpCode { - if len(c.Code) > 0 && len(c.Code) <= 64*1024*1024 && n < uint64(len(c.Code)) { + if len(c.Code) > 0 && len(c.Code) <= math.MaxUint8 && n < uint64(len(c.Code)) { return OpCode(c.Code[n]) }