1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

Fix compatibility check with patch version

This commit is contained in:
nordsoft 2023-08-28 17:49:13 +04:00
parent 925bde68ff
commit 93f14c984d

View File

@ -108,8 +108,8 @@ void CModInfo::loadLocalData(const JsonNode & data)
}
//check compatibility
implicitlyEnabled &= (vcmiCompatibleMin.isNull() || CModVersion::GameVersion().compatible(vcmiCompatibleMin, true));
implicitlyEnabled &= (vcmiCompatibleMax.isNull() || vcmiCompatibleMax.compatible(CModVersion::GameVersion(), true));
implicitlyEnabled &= (vcmiCompatibleMin.isNull() || CModVersion::GameVersion().compatible(vcmiCompatibleMin, true, true));
implicitlyEnabled &= (vcmiCompatibleMax.isNull() || vcmiCompatibleMax.compatible(CModVersion::GameVersion(), true, true));
if(!implicitlyEnabled)
logGlobal->warn("Mod %s is incompatible with current version of VCMI and cannot be enabled", name);