Commit 58e45bfd authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fix important bug in graph i/o

The _max_edge_index variable was not set when reading a graph, which
caused memory corruption when deleting and adding edges.
parent 44d4dbee
......@@ -523,6 +523,7 @@ python::tuple GraphInterface::ReadFromFile(string file, python::object pfile,
read_graphml(stream, ug, dp);
_nedges = num_edges(_mg);
_max_edge_index = (_nedges > 0) ? _nedges - 1 : 0;
python::dict vprops, eprops, gprops;
for(typeof(dp.begin()) iter = dp.begin(); iter != dp.end(); ++iter)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment