Fix branchif instruction.
@@ -299,15 +299,19 @@ var builtInActions = map[operationType]*action{
v := t.stack.pop()
bool, isBool := v.Target.(*BooleanObject)
- if isBool {
- if !bool.value {
+ if isBool && !bool.value {
+ return
+ }
+
+ _, isNull := v.Target.(*NullObject)
+
+ if isNull {
return
}
line := args[0].(int)
cf.pc = line
return
- }
},
},
bytecode.Jump: {
