Skip to content

Commit

Permalink
Fix for issue go-yaml#91
Browse files Browse the repository at this point in the history
Signed-off-by: Vinzenz Feenstra <evilissmo@redhat.com>
  • Loading branch information
Vinzenz Feenstra committed Mar 27, 2017
1 parent ce98f78 commit 58d947a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,11 @@ func (d *decoder) mappingSlice(n *node, out reflect.Value) (good bool) {
var l = len(n.children)
for i := 0; i < l; i += 2 {
if isMerge(n.children[i]) {
d.merge(n.children[i+1], out)
tmp := reflect.ValueOf(map[interface{}]interface{}{})
d.merge(n.children[i+1], tmp)
for k, v := range tmp.Interface().(map[interface{}]interface{}) {
slice = append(slice, MapItem{k, v})
}
continue
}
item := MapItem{}
Expand Down

0 comments on commit 58d947a

Please sign in to comment.