diff --git a/pkg/vm/vm.go b/pkg/vm/vm.go index 122e4062b..40fe95952 100644 --- a/pkg/vm/vm.go +++ b/pkg/vm/vm.go @@ -196,10 +196,11 @@ func (v *VM) LoadFile(path string) error { // Load initializes the VM with the program given. func (v *VM) Load(prog []byte) { - // clear all stacks, it could be a reload. + // Clear all stacks and state, it could be a reload. v.istack.Clear() v.estack.Clear() v.astack.Clear() + v.state = noneState v.LoadScript(prog) }