From 1defd4684bd2bbe85015acc723a4b0a4fb20113f Mon Sep 17 00:00:00 2001 From: zgfzgf <1901989065@qq.com> Date: Wed, 20 Mar 2024 16:03:11 +0800 Subject: [PATCH] core/asm: optimize code --- 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 ff41ff5315..4daa8dccf4 100644 --- a/core/asm/asm.go +++ b/core/asm/asm.go @@ -68,7 +68,7 @@ func (it *instructionIterator) Next() bool { if it.op.IsPush() { a := uint64(it.op) - uint64(vm.PUSH0) u := it.pc + 1 + a - if uint64(len(it.code)) <= it.pc || uint64(len(it.code)) < u { + if uint64(len(it.code)) < u { it.error = fmt.Errorf("incomplete push instruction at %v", it.pc) return false }