summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-23 12:13:53 +0000
committerrubidium <rubidium@openttd.org>2009-07-23 12:13:53 +0000
commit5f9ee68eac0f3f7d898ca09f0800bf63b32b1f05 (patch)
tree364e5ae7249184e66338cb7ac784d936882b238c /src/station_cmd.cpp
parent16ad8df17555e4745b1c77d08d3d3e489a2d8e68 (diff)
downloadopenttd-5f9ee68eac0f3f7d898ca09f0800bf63b32b1f05.tar.xz
(svn r16926) -Fix (r16925): if checking whether a station can be adjoined, don't check whether 'the other station you have already found' to be valid but the station that you just found. Especially because you won't have found as station until you have found one.
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 9c54cbac6..c9fc22cba 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -81,7 +81,7 @@ static Station *GetStationAround(TileIndex tile, int w, int h, StationID closest
StationID t = GetStationIndex(tile_cur);
if (closest_station == INVALID_STATION) {
- if (Station::IsValidID(closest_station)) closest_station = t;
+ if (Station::IsValidID(t)) closest_station = t;
} else if (closest_station != t) {
_error_message = STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING;
return CHECK_STATIONS_ERR;