Decoder: fix panic on table array behind a pointer (#682)

Fixes #677
This commit is contained in:
Thomas Pelletier
2021-11-24 18:50:04 -05:00
committed by GitHub
parent 1b5a25c0ef
commit 79e78b234c
2 changed files with 39 additions and 1 deletions
+3 -1
View File
@@ -345,7 +345,9 @@ func (d *decoder) handleArrayTableCollection(key ast.Iterator, v reflect.Value)
if err != nil {
return reflect.Value{}, err
}
v.Elem().Set(elem)
if elem.IsValid() {
v.Elem().Set(elem)
}
return v, nil
case reflect.Slice: