Add assert or return check for bad player numbers for allianceExists script function. This is needed to make BP run

on trunk with --noassert.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8060 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2009-08-28 17:20:20 +00:00 committed by Git SVN Gateway
parent 56c172241c
commit 5799aa6dc3
1 changed files with 2 additions and 0 deletions

View File

@ -4206,6 +4206,8 @@ BOOL scrAllianceExistsBetween(void)
{
return false;
}
ASSERT_OR_RETURN(false, i < MAX_PLAYERS && j < MAX_PLAYERS && i >= 0 && j >= 0,
"Invalid player parameters %d and %d", i, j);
if(alliances[i][j] == ALLIANCE_FORMED)
{
scrFunctionResult.v.bval = true;