vm: count initial Null slot variables as well

Match C# behavior. Thanks to @ixje for finding this.
This commit is contained in:
Roman Khimov 2022-05-16 17:42:57 +03:00
parent 18d627e7f7
commit 0d93b353e6
5 changed files with 20 additions and 15 deletions

View file

@ -56,11 +56,11 @@ func opParamSlotsPushVM(op opcode.Opcode, param []byte, sslot int, slotloc int,
return nil
}
if sslot != 0 {
v.Context().static.init(sslot)
v.Context().static.init(sslot, &v.refs)
}
if slotloc != 0 && slotarg != 0 {
v.Context().local.init(slotloc)
v.Context().arguments.init(slotarg)
v.Context().local.init(slotloc, &v.refs)
v.Context().arguments.init(slotarg, &v.refs)
}
for i := range items {
item, ok := items[i].(stackitem.Item)