Changeset - r8296:1e3d4b322f00
[Not reviewed]
master
0 1 0
peter1138 - 17 years ago 2008-01-15 11:43:06
peter1138@openttd.org
(svn r11860) -Fix: Test station class validity against number of classes, not abosolute limit.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -1004,7 +1004,7 @@ CommandCost CmdBuildRailroadStation(Tile
 
	}
 

	
 
	/* Check if the given station class is valid */
 
	if (GB(p2, 8, 8) >= STAT_CLASS_MAX) return CMD_ERROR;
 
	if (GB(p2, 8, 8) >= GetNumStationClasses()) return CMD_ERROR;
 

	
 
	/* Check if we can allocate a custom stationspec to this station */
 
	const StationSpec *statspec = GetCustomStationSpec((StationClassID)GB(p2, 8, 8), GB(p2, 16, 8));
0 comments (0 inline, 0 general)