Fix #10619: Crash loading linkgraph for older savegames. (#10620)

This commit is contained in:
PeterN 2023-04-09 19:28:55 +01:00 committed by GitHub
parent c6ff7dad68
commit 078e27bd84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ public:
if (IsSavegameVersionBefore(SLV_191)) {
/* We used to save the full matrix ... */
for (NodeID to = 0; to < max_size; ++to) {
SlObject(&_linkgraph->nodes[_linkgraph_from].edges[to], this->GetLoadDescription());
SlObject(&edges[to], this->GetLoadDescription());
}
} else {
size_t used_size = IsSavegameVersionBefore(SLV_SAVELOAD_LIST_LENGTH) ? max_size : SlGetStructListLength(UINT16_MAX);