1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Fix crash on loading town with unit that has ability propagated to army

This commit is contained in:
Ivan Savenko
2025-07-31 21:57:28 +03:00
parent bfc7ca8c86
commit 760eff8139

View File

@@ -2474,7 +2474,10 @@ std::shared_ptr<CGObjectInstance> CMapLoaderH3M::readTown(const int3 & position,
std::optional<FactionID> faction;
if (objectTemplate->id == Obj::TOWN)
{
faction = FactionID(objectTemplate->subid);
object->subID = objectTemplate->subid;
}
bool hasName = reader->readBool();
if(hasName)