[#11] morph: Return nil on Any stack item array type

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
support/v0.27
Leonard Lyubich 2020-08-24 17:05:22 +03:00 committed by Alex Vanin
parent f71d64435e
commit 9e30a87022
1 changed files with 4 additions and 0 deletions

View File

@ -94,6 +94,10 @@ func ArrayFromStackParameter(param sc.Parameter) ([]sc.Parameter, error) {
}
if param.Type != sc.ArrayType {
if param.Type == sc.AnyType && param.Value == nil {
return nil, nil
}
return nil, errors.Errorf("chain/client: %s is not an array type", param.Type)
}