Fix bug where a check for player < max number of players is toos trick. Closes ticket:762
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7909 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
a015282a1e
commit
1d80719f5a
|
@ -464,7 +464,10 @@ BOOL setPlayerName(UDWORD player, const char *sName)
|
|||
// to determine human/computer players and responsibilities of each..
|
||||
BOOL isHumanPlayer(UDWORD player)
|
||||
{
|
||||
ASSERT_OR_RETURN(false, player < MAX_PLAYERS, "Player index (%u) out of range", player);
|
||||
if (player >= MAX_PLAYERS)
|
||||
{
|
||||
return false; // obvious, really
|
||||
}
|
||||
return NetPlay.players[player].allocated;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue