1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Fix checking PlayerColor's for validness

This commit is contained in:
Ivan Savenko
2023-08-27 01:35:38 +03:00
parent 3b06abd0d7
commit ce20d913e0
25 changed files with 55 additions and 49 deletions

View File

@@ -46,7 +46,7 @@ ColorRGBA CMinimapInstance::getTileColor(const int3 & pos) const
if(player == PlayerColor::NEUTRAL)
return graphics->neutralColor;
if (player < PlayerColor::PLAYER_LIMIT)
if (player.isValidPlayer())
return graphics->playerColors[player.getNum()];
}