Limit what is considered a valid tile (#3631)

`smooth_land_tile` already calls to `map_is_location_valid`, but the
latter allows for elements that are clearly outside the range.

Fixes #3549
This commit is contained in:
Michał Janiszewski 2016-05-16 11:32:08 +02:00 committed by Ted John
parent 193ae36cb4
commit d4394c73d3
1 changed files with 1 additions and 1 deletions

View File

@ -655,7 +655,7 @@ int map_height_from_slope(int x, int y, int slope)
bool map_is_location_valid(int x, int y)
{
if (x <= (256 * 32) && x >= 0 && y <= (256 * 32) && y >= 0) {
if (x < (256 * 32) && x >= 0 && y < (256 * 32) && y >= 0) {
return true;
}
return false;