vm: make (*Context).IP() return instruction pointer
It is misleading to return +1 in code, and user representation can always be altered.
This commit is contained in:
parent
187a2d14b1
commit
681e81420a
3 changed files with 5 additions and 7 deletions
|
@ -433,8 +433,8 @@ func handleOps(c *ishell.Context) {
|
|||
}
|
||||
|
||||
func changePrompt(c ishell.Actions, v *vm.VM) {
|
||||
if v.Ready() && v.Context().IP()-1 >= 0 {
|
||||
c.SetPrompt(fmt.Sprintf("NEO-GO-VM %d > ", v.Context().IP()-1))
|
||||
if v.Ready() && v.Context().IP() >= 0 {
|
||||
c.SetPrompt(fmt.Sprintf("NEO-GO-VM %d > ", v.Context().IP()))
|
||||
} else {
|
||||
c.SetPrompt("NEO-GO-VM > ")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue