# HG changeset patch # User smatz # Date 2009-09-08 07:16:26 # Node ID ecbe762e1011d4fae3c6c3f973310d78cc505c1a # Parent 71b3aafd8d14549ca610f5270fd1db66e77e2604 (svn r17470) -Fix (r17460): possible crash when overbuiling rail by station diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -727,7 +727,7 @@ CommandCost CheckFlatLandBelow(TileIndex * 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