mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 13:41:37 +00:00
stackitem: don't overwrite error when serializing Item
We must get out as quickly as possible.
This commit is contained in:
parent
e34fa2e915
commit
1b7b7e4bec
1 changed files with 3 additions and 0 deletions
|
@ -39,6 +39,9 @@ func EncodeBinaryStackItemAppExec(item Item, w *io.BinWriter) {
|
|||
}
|
||||
|
||||
func serializeItemTo(item Item, w *io.BinWriter, allowInvalid bool, seen map[Item]bool) {
|
||||
if w.Err != nil {
|
||||
return
|
||||
}
|
||||
if seen[item] {
|
||||
w.Err = errors.New("recursive structures can't be serialized")
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue