forked from TrueCloudLab/neoneo-go
transaction: fix maxSubitems handling in JSON scope unmarshaller
Notice that binary deserializer (readArrayOfConditions) does it correctly. Can be checked with neo-project/neo#2720 case.
This commit is contained in:
parent
bd352daab4
commit
acb1151d71
1 changed files with 1 additions and 1 deletions
|
@ -549,7 +549,7 @@ func unmarshalArrayOfConditionJSONs(arr []json.RawMessage, maxDepth int) ([]Witn
|
||||||
if l == 0 {
|
if l == 0 {
|
||||||
return nil, errors.New("empty array of conditions")
|
return nil, errors.New("empty array of conditions")
|
||||||
}
|
}
|
||||||
if l >= maxSubitems {
|
if l > maxSubitems {
|
||||||
return nil, errors.New("too many elements")
|
return nil, errors.New("too many elements")
|
||||||
}
|
}
|
||||||
res := make([]WitnessCondition, l)
|
res := make([]WitnessCondition, l)
|
||||||
|
|
Loading…
Reference in a new issue