fix root serialization

This commit is contained in:
Júlio César Batista 2023-02-18 12:20:28 -03:00
parent 51764057f1
commit 8105f02dc7
No known key found for this signature in database
GPG key ID: 10C4B861BF314878

View file

@ -24,10 +24,10 @@ func DeserializeGraph(bytes []byte, g *Graph) error {
return err return err
} }
g.Root = &Object{ var root Object
Graph: g, convert(sg.Root, &root)
Children: make(map[string]*Object), g.Root = &root
} root.Graph = g
idToObj := make(map[string]*Object) idToObj := make(map[string]*Object)
idToObj[""] = g.Root idToObj[""] = g.Root