Fix ticket 342 - out of range path node crashes game
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6905 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
2ad693b643
commit
60fe79b68f
|
@ -137,7 +137,10 @@ static FP_NODE* fpathGetNode(int x, int y)
|
|||
{
|
||||
FP_NODE * psFound;
|
||||
|
||||
ASSERT(x < ARRAY_SIZE(nodeArray) && y < ARRAY_SIZE(nodeArray[x]), "X (%d) or Y %d) coordinate for path finding node is out of range!", x, y);
|
||||
if (x < 0 || y < 0 || x >= ARRAY_SIZE(nodeArray) || y >= ARRAY_SIZE(nodeArray[x]))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
psFound = nodeArray[x][y];
|
||||
if (psFound
|
||||
|
|
Loading…
Reference in New Issue