diff options
author | Darkvater <Darkvater@openttd.org> | 2005-05-09 19:56:08 +0000 |
---|---|---|
committer | Darkvater <Darkvater@openttd.org> | 2005-05-09 19:56:08 +0000 |
commit | f9fdddb0ad04bb3e1c441884696b08182b82e447 (patch) | |
tree | ba285562d13c6f1656ca2db3f91bc4c98e868618 /waypoint.c | |
parent | 84b0d2d19d3ed5ca133a00d09fbd6c62a7020cb7 (diff) | |
download | openttd-f9fdddb0ad04bb3e1c441884696b08182b82e447.tar.xz |
(svn r2287) - Fix (regression): cast stationcount to unsigned instead of p1 to signed when checking valid waypoint types. Thanks for pointing it out Tron
Diffstat (limited to 'waypoint.c')
-rw-r--r-- | waypoint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/waypoint.c b/waypoint.c index 4d5225b61..dd6750fe1 100644 --- a/waypoint.c +++ b/waypoint.c @@ -163,7 +163,7 @@ int32 CmdBuildTrainWaypoint(int x, int y, uint32 flags, uint32 p1, uint32 p2) 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); |