mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 23:02:27 +00:00
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
|
@ -221,7 +221,7 @@ func TestBuiltinDoesNotCompile(t *testing.T) {
|
|||
ctx := v.Context()
|
||||
retCount := 0
|
||||
for op, _, err := ctx.Next(); err == nil; op, _, err = ctx.Next() {
|
||||
if ctx.IP() > len(ctx.Program()) {
|
||||
if ctx.IP() >= len(ctx.Program()) {
|
||||
break
|
||||
}
|
||||
if op == opcode.RET {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue