mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-07 23:10:32 +00:00
vm: fix TRY offsets check
TRY can have an offset != 0 and still it can't have both parameters set to zero.
This commit is contained in:
parent
32112249d5
commit
681ae4d5d6
2 changed files with 6 additions and 2 deletions
|
@ -1370,7 +1370,7 @@ func (v *VM) execute(ctx *Context, op opcode.Opcode, parameter []byte) (err erro
|
|||
}
|
||||
cOffset := v.getJumpOffset(ctx, catchP)
|
||||
fOffset := v.getJumpOffset(ctx, finallyP)
|
||||
if cOffset == 0 && fOffset == 0 {
|
||||
if cOffset == ctx.ip && fOffset == ctx.ip {
|
||||
panic("invalid offset for TRY*")
|
||||
} else if cOffset == ctx.ip {
|
||||
cOffset = -1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue