diff options
author | peter1138 <peter1138@openttd.org> | 2019-03-13 07:29:11 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-03-13 08:40:25 +0000 |
commit | 6b92b83128d92e5b064649922780eadeee9c31ba (patch) | |
tree | e0dda670fdfe00f3233f8fd21b10c2c9ad63988c | |
parent | 43ced57794ca5546e5f5a18eb82990d20845967c (diff) | |
download | openttd-6b92b83128d92e5b064649922780eadeee9c31ba.tar.xz |
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.
-rw-r--r-- | src/station_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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. */ |