mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Fix infinite loop
This commit is contained in:
@@ -535,7 +535,14 @@ void CMapGenOptions::finalize(CRandomGenerator & rand)
|
||||
{
|
||||
return i > (maxPlayers - presentPlayers);
|
||||
});
|
||||
compOnlyPlayerCount = *RandomGeneratorUtil::nextItem(possiblePlayers, rand);
|
||||
if (possiblePlayers.empty())
|
||||
{
|
||||
compOnlyPlayerCount = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
compOnlyPlayerCount = *RandomGeneratorUtil::nextItem(possiblePlayers, rand);
|
||||
}
|
||||
updateCompOnlyPlayers();
|
||||
}
|
||||
if(compOnlyTeamCount == RANDOM_SIZE)
|
||||
|
||||
Reference in New Issue
Block a user