From 6b92b83128d92e5b064649922780eadeee9c31ba Mon Sep 17 00:00:00 2001 From: peter1138 Date: Wed, 13 Mar 2019 07:29:11 +0000 Subject: Fix #7372: FindStationsAroundTiles() with caching returns no result for industry tiles. Currently this can only be triggered by NewGRF house tiles querying for cargo acceptance history of nearby stations (var 0x64) with a tile offset, and providing an offset that happens to point to an industry tile. This serves no useful purpose. --- src/station_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index ec4f6739e..df71da127 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -3829,7 +3829,7 @@ void FindStationsAroundTiles(const TileArea &location, StationList *stations, bo /* Industries and towns maintain a list of nearby stations */ if (IsTileType(location.tile, MP_INDUSTRY)) { /* Industry nearby stations are already filtered by catchment. */ - stations = &Industry::GetByTile(location.tile)->stations_near; + *stations = Industry::GetByTile(location.tile)->stations_near; return; } else if (IsTileType(location.tile, MP_HOUSE)) { /* Town nearby stations need to be filtered per tile. */ -- cgit v1.2.3-70-g09d2