mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 23:25:22 +00:00
vm/tests: do not load empty script
In case we load a zero-length script, VM should end in HALT state. https://github.com/neo-project/neo-vm/blob/master/tests/neo-vm.Tests/Tests/Others/OtherCases.json#L22
This commit is contained in:
parent
86c4f1abc5
commit
16bf72f9cc
1 changed files with 3 additions and 1 deletions
|
@ -2455,7 +2455,9 @@ func makeProgram(opcodes ...opcode.Opcode) []byte {
|
|||
|
||||
func load(prog []byte) *VM {
|
||||
vm := New()
|
||||
vm.LoadScript(prog)
|
||||
if len(prog) != 0 {
|
||||
vm.LoadScript(prog)
|
||||
}
|
||||
return vm
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue