diff options
author | Yexo <yexo@openttd.org> | 2009-01-29 16:14:46 +0000 |
---|---|---|
committer | Yexo <yexo@openttd.org> | 2009-01-29 16:14:46 +0000 |
commit | 1c7cb8368cb90a5e94daed132c6f49be40931c81 (patch) | |
tree | ed68ce9c099b5df6ea8f9e3aac89996f672dbdb9 | |
parent | 627d54a08119b3df2109e2857b2024cf82124b6b (diff) | |
download | openttd-1c7cb8368cb90a5e94daed132c6f49be40931c81.tar.xz |
(svn r15295) -Fix [FS#2591] (r15190): Towns tried to build roads outside the map.
-rw-r--r-- | src/road.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/road.cpp b/src/road.cpp index f72440fef..4680911c3 100644 --- a/src/road.cpp +++ b/src/road.cpp @@ -26,6 +26,7 @@ bool IsPossibleCrossing(const TileIndex tile, Axis ax) RoadBits CleanUpRoadBits(const TileIndex tile, RoadBits org_rb) { + if (!IsValidTile(tile)) return ROAD_NONE; for (DiagDirection dir = DIAGDIR_BEGIN; dir < DIAGDIR_END; dir++) { const TileIndex neighbor_tile = TileAddByDiagDir(tile, dir); |