summaryrefslogtreecommitdiff
path: root/src/saveload/linkgraph_sl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload/linkgraph_sl.cpp')
-rw-r--r--src/saveload/linkgraph_sl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/saveload/linkgraph_sl.cpp b/src/saveload/linkgraph_sl.cpp
index a597edfc4..f571e331a 100644
--- a/src/saveload/linkgraph_sl.cpp
+++ b/src/saveload/linkgraph_sl.cpp
@@ -151,6 +151,7 @@ void SaveLoad_LinkGraph(LinkGraph &lg)
} else {
/* ... but as that wasted a lot of space we save a sparse matrix now. */
for (NodeID to = from; to != INVALID_NODE; to = lg.edges[from][to].next_edge) {
+ if (to >= size) SlErrorCorrupt("Link graph structure overflow");
SlObject(&lg.edges[from][to], _edge_desc);
}
}