Skip to content

Commit

Permalink
ignore empty slice
Browse files Browse the repository at this point in the history
Signed-off-by: kom0055 <[email protected]>
  • Loading branch information
kom0055 committed Nov 9, 2023
1 parent d9ddca6 commit 77fc8f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ func shuttleUnmarshal(out any, unmarshal func(any, reflect.Type, reflect.Type) e
outVal.Field(i).Set(inValIdxi)
continue
}
if inValIdxi.Len() == 0 {
continue
}
newSliceVal := reflect.MakeSlice(outValTypeIdxi, inValIdxi.Len(), inValIdxi.Len())
for i, n := 0, inValIdxi.Len(); i < n; i++ {

Expand Down
File renamed without changes.

0 comments on commit 77fc8f8

Please sign in to comment.