(svn r17470) -Fix (r17460): possible crash when overbuiling rail by station

pull/155/head
smatz 15 years ago
parent 8a3386bb7a
commit ebe2bc0a02

@ -727,7 +727,7 @@ CommandCost CheckFlatLandBelow(TileIndex tile, uint w, uint h, DoCommandFlag fla
* build isn't a rail station it's INVALID_RAILTYPE. */
if (rt != INVALID_RAILTYPE &&
IsPlainRailTile(tile_cur) && !HasSignals(tile_cur) &&
HasPowerOnRail(GetRailType(tile), rt)) {
HasPowerOnRail(GetRailType(tile_cur), rt)) {
/* Allow overbuilding if the tile:
* - has rail, but no signals
* - it has exactly one track

Loading…
Cancel
Save