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.
This commit is contained in:
peter1138 2019-03-13 07:29:11 +00:00 committed by PeterN
parent 43ced57794
commit 6b92b83128
1 changed files with 1 additions and 1 deletions

View File

@ -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. */