mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-01-22 09:43:47 +00:00
Merge pull request #974 from nspcc-dev/fix/state
vm: allow to convert Map item to bool Fixes 2020-05-21T17:45:51.808+0300 WARN contract invocation failed {"tx": "71c43cc32ae5336622d7105d1c96387c8cca6c948beac29edfef46712ba5ffeb", "block": 3960417, "error": "error encountered at instruction 14802 (JMPIFNOT): can't convert to bool: Map"}
This commit is contained in:
commit
4fda492873
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ func (e *Element) TryBool() (bool, error) {
|
|||
return t.value.Int64() != 0, nil
|
||||
case *BoolItem:
|
||||
return t.value, nil
|
||||
case *ArrayItem, *StructItem:
|
||||
case *ArrayItem, *StructItem, *MapItem:
|
||||
return true, nil
|
||||
case *ByteArrayItem:
|
||||
for _, b := range t.value {
|
||||
|
|
Loading…
Reference in a new issue