diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -364,7 +364,7 @@ TownScopeResolver *StationResolverObject if (IsCustomStationSpecIndex(nearby_tile)) { const StationSpecList ssl = BaseStation::GetByTile(nearby_tile)->speclist[GetCustomStationSpecIndex(nearby_tile)]; - res |= 1 << (ssl.grfid != grfid ? 9 : 8) | std::max(ssl.localidx, 0xFF); + res |= 1 << (ssl.grfid != grfid ? 9 : 8) | ClampTo(ssl.localidx); } return res; }