Changeset - r1783:81914fd018f2
[Not reviewed]
master
0 1 0
Darkvater - 19 years ago 2005-05-09 19:56:08
darkvater@openttd.org
(svn r2287) - Fix (regression): cast stationcount to unsigned instead of p1 to signed when checking valid waypoint types. Thanks for pointing it out Tron
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
waypoint.c
Show inline comments
 
@@ -163,7 +163,7 @@ int32 CmdBuildTrainWaypoint(int x, int y
 
	SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
 

	
 
	/* if custom gfx are used, make sure it is within bounds */
 
	if ((int)p1 > 0x100 + GetCustomStationsCount(STAT_CLASS_WAYP)) return CMD_ERROR;
 
	if (p1 > 0x100 + (uint)GetCustomStationsCount(STAT_CLASS_WAYP)) return CMD_ERROR;
 

	
 
	if (!IsTileType(tile, MP_RAILWAY) || ((dir = 0, _map5[tile] != 1) && (dir = 1, _map5[tile] != 2)))
 
		return_cmd_error(STR_1005_NO_SUITABLE_RAILROAD_TRACK);
0 comments (0 inline, 0 general)