From 66ca654b0704c7d3bd5b1932cb6bf73f8a3fb1f8 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Tue, 29 Sep 2020 12:21:51 +0300 Subject: [PATCH] vm: refactor ISNULL opcode handling --- pkg/vm/vm.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/vm/vm.go b/pkg/vm/vm.go index 0aa99207b..ffc9332e6 100644 --- a/pkg/vm/vm.go +++ b/pkg/vm/vm.go @@ -531,8 +531,8 @@ func (v *VM) execute(ctx *Context, op opcode.Opcode, parameter []byte) (err erro v.estack.PushVal(stackitem.Null{}) case opcode.ISNULL: - res := v.estack.Pop().value.Equals(stackitem.Null{}) - v.estack.PushVal(res) + _, ok := v.estack.Pop().value.(stackitem.Null) + v.estack.PushVal(ok) case opcode.ISTYPE: res := v.estack.Pop().Item()