From 6f929a0762be92130588779a8535ed0e3fc58d87 Mon Sep 17 00:00:00 2001 From: zgfzgf <48779939+zgfzgf@users.noreply.github.com> Date: Wed, 20 Mar 2024 15:46:50 +0800 Subject: [PATCH] core/asm: minor code-clarification (#29293) --- core/asm/asm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/asm/asm.go b/core/asm/asm.go index 294eb6ffaa..ff41ff5315 100644 --- a/core/asm/asm.go +++ b/core/asm/asm.go @@ -66,7 +66,7 @@ func (it *instructionIterator) Next() bool { it.op = vm.OpCode(it.code[it.pc]) if it.op.IsPush() { - a := uint64(it.op) - uint64(vm.PUSH1) + 1 + a := uint64(it.op) - uint64(vm.PUSH0) u := it.pc + 1 + a if uint64(len(it.code)) <= it.pc || uint64(len(it.code)) < u { it.error = fmt.Errorf("incomplete push instruction at %v", it.pc)