Browse Source

Fix OOB in TEST(PathTest, Solid)

pull/2891/head
Gleb Mazovetskiy 5 years ago committed by Anders Jenbo
parent
commit
c23c69d131
  1. 4
      Source/path.cpp

4
Source/path.cpp

@ -285,6 +285,10 @@ bool GetPath(const std::function<bool(Point)> &posOk, PATHNODE *pPath, Point des
bool IsTileNotSolid(Point position)
{
if (position.x < 0 || position.y < 0 || position.x >= MAXDUNX || position.y >= MAXDUNY) {
return false;
}
return !nSolidTable[dPiece[position.x][position.y]];
}

Loading…
Cancel
Save