From 5bd666b7860e623bec9b13da383797a2c19985b1 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Tue, 10 Sep 2019 19:17:33 +0300 Subject: [PATCH] vm: return NOP as current instruction for just loaded VM Before: NEO-GO-VM > loadgo h.go READY: loaded 16 instructions NEO-GO-VM > ip instruction pointer at -1 (PUSH0) After: NEO-GO-VM > loadgo h.go READY: loaded 16 instructions NEO-GO-VM > ip instruction pointer at -1 (NOP) I think NOP is a little less scary. --- pkg/vm/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/vm/context.go b/pkg/vm/context.go index 043c89acf..e6fb159f6 100644 --- a/pkg/vm/context.go +++ b/pkg/vm/context.go @@ -49,7 +49,7 @@ func (c *Context) LenInstr() int { // CurrInstr returns the current instruction and opcode. func (c *Context) CurrInstr() (int, Instruction) { if c.ip < 0 { - return c.ip, Instruction(0x00) + return c.ip, NOP } return c.ip, Instruction(c.prog[c.ip]) }