mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Fix checking PlayerColor's for validness
This commit is contained in:
@@ -570,7 +570,7 @@ void ApplyClientNetPackVisitor::visitSetHeroesInTown(SetHeroesInTown & pack)
|
||||
//inform all players that see this object
|
||||
for(auto i = cl.playerint.cbegin(); i != cl.playerint.cend(); ++i)
|
||||
{
|
||||
if(i->first >= PlayerColor::PLAYER_LIMIT)
|
||||
if(!i->first.isValidPlayer())
|
||||
continue;
|
||||
|
||||
if(gs.isVisible(t, i->first) ||
|
||||
|
||||
Reference in New Issue
Block a user