mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-20 19:02:41 +01:00
(svn r16310) [0.7] -Backport from trunk:
- Fix: Parameter is invalid when it is equal to length of an array (r16308) - Fix: Close all windows before unloading the AI system as closing the content-download window will rescan for AIs [FS#2901] (r16306) - Fix: ICC (Intel C++ Compiler) defined __GNUC__ but does not define __builtin_bswap32, so fall back to the default swap method for ICC (r16295) - Fix: Road vehicles were unable to find a depot when turning around (in some cases), causing 'nearest depot' orders to be occasionally lost [FS#2893] (r16291
This commit is contained in:
@@ -1820,7 +1820,7 @@ CommandCost CmdBuildAirport(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
|
||||
if (distant_join && (!_settings_game.station.distant_join_stations || !IsValidStationID(station_to_join))) return CMD_ERROR;
|
||||
|
||||
/* Check if a valid, buildable airport was chosen for construction */
|
||||
if (p1 > lengthof(_airport_sections) || !HasBit(GetValidAirports(), p1)) return CMD_ERROR;
|
||||
if (p1 >= lengthof(_airport_sections) || !HasBit(GetValidAirports(), p1)) return CMD_ERROR;
|
||||
|
||||
if (!CheckIfAuthorityAllowsNewStation(tile, flags)) {
|
||||
return CMD_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user