Saveload: Fix upstream version handling of league table chunks

This commit is contained in:
Jonathan G Rennison
2023-03-07 18:41:23 +00:00
parent 6aa8997eee
commit 57437e7068
3 changed files with 16 additions and 6 deletions

View File

@@ -2298,8 +2298,10 @@ static void SlSaveChunk(const ChunkHandler &ch)
if (ch.type == CH_UPSTREAM_SAVE) {
SaveLoadVersion old_ver = _sl_version;
_sl_version = MAX_LOAD_SAVEGAME_VERSION;
auto guard = scope_guard([&]() {
_sl_version = old_ver;
});
upstream_sl::SlSaveChunkChunkByID(ch.id);
_sl_version = old_ver;
return;
}