fix bounds checks (#3237)
This commit is contained in:
parent
9cee65da6c
commit
0ccdf940f7
7 changed files with 16 additions and 22 deletions
|
|
@ -3369,7 +3369,7 @@ void ClrPlrPath(Player &player)
|
|||
*/
|
||||
bool PosOkPlayer(const Player &player, Point position)
|
||||
{
|
||||
if (position.x < 0 || position.x >= MAXDUNX || position.y < 0 || position.y >= MAXDUNY)
|
||||
if (!InDungeonBounds(position))
|
||||
return false;
|
||||
if (dPiece[position.x][position.y] == 0)
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue