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 Nov 2, 2016
1 parent f80922e commit af2aa62
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 @@ -674,7 +674,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 af2aa62

Please sign in to comment.