1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-10 22:31:40 +02:00

Merge pull request #5680 from kdmcser/crash_fix3

fix load game crash
This commit is contained in:
Ivan Savenko
2025-05-05 16:03:27 +03:00
committed by GitHub

View File

@@ -1766,13 +1766,13 @@ void CGameState::loadGame(CLoadFile & file)
logGlobal->info("Loading game state...");
CMapHeader dummyHeader;
auto startInfo = std::make_shared<StartInfo>();
StartInfo dummyStartInfo;
ActiveModsInSaveList dummyActiveMods;
file.load(dummyHeader);
if (file.hasFeature(ESerializationVersion::NO_RAW_POINTERS_IN_SERIALIZER))
{
file.load(startInfo);
file.load(dummyStartInfo);
file.load(dummyActiveMods);
file.load(*this);
}
@@ -1781,7 +1781,7 @@ void CGameState::loadGame(CLoadFile & file)
bool dummyA = false;
uint32_t dummyB = 0;
uint16_t dummyC = 0;
file.load(startInfo);
file.load(dummyStartInfo);
file.load(dummyActiveMods);
file.load(dummyA);
file.load(dummyB);