mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Added range checks to values read from h3m.
Fixes reading of morale/luck values (-3..3) as unsigned leading to overflow.
This commit is contained in:
@ -117,7 +117,7 @@ void CMapHeader::setupEvents()
|
||||
}
|
||||
|
||||
CMapHeader::CMapHeader() : version(EMapFormat::VCMI), height(72), width(72),
|
||||
twoLevel(true), difficulty(1), levelLimit(0), howManyTeams(0), areAnyPlayers(false)
|
||||
twoLevel(true), difficulty(EMapDifficulty::NORMAL), levelLimit(0), howManyTeams(0), areAnyPlayers(false)
|
||||
{
|
||||
setupEvents();
|
||||
allowedHeroes = VLC->heroh->getDefaultAllowed();
|
||||
|
Reference in New Issue
Block a user