Changeset - r11903:677f87cdc9d8
[Not reviewed]
master
0 2 0
smatz - 16 years ago 2009-05-14 23:40:03
smatz@openttd.org
(svn r16308) -Fix: parameter is invalid when it's equal to length of an array (Yexo)
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -1820,7 +1820,7 @@ CommandCost CmdBuildAirport(TileIndex ti
 
	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;
src/town_cmd.cpp
Show inline comments
 
@@ -2553,7 +2553,7 @@ uint GetMaskOfTownActions(int *nump, Com
 
 */
 
CommandCost CmdDoTownAction(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
 
{
 
	if (!IsValidTownID(p1) || p2 > lengthof(_town_action_proc)) return CMD_ERROR;
 
	if (!IsValidTownID(p1) || p2 >= lengthof(_town_action_proc)) return CMD_ERROR;
 

	
 
	Town *t = GetTown(p1);
 

	
0 comments (0 inline, 0 general)