From 55fa12355e969d81124ea360234281e83bbc62ab Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Tue, 11 Jun 2024 17:50:53 +0300 Subject: [PATCH] stackitem: extend Make() with []string Allow []string to be converted to stackitem.Item. Signed-off-by: Anna Shaleva --- pkg/vm/stackitem/item.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/vm/stackitem/item.go b/pkg/vm/stackitem/item.go index 33ff664bf..6eacbea18 100644 --- a/pkg/vm/stackitem/item.go +++ b/pkg/vm/stackitem/item.go @@ -128,6 +128,12 @@ func Make(v any) Item { a = append(a, Make(i)) } return Make(a) + case []string: + var a []Item + for _, i := range val { + a = append(a, Make(i)) + } + return Make(a) case []any: res := make([]Item, len(val)) for i := range val {