# HG changeset patch # User Darkvater # Date 1115668568 0 # Node ID 7830a792ce702063e18c8100b6d12fa42a3ea998 # Parent 48749e4c2dc6cf744f3f13de0ebb074362cb08a8 (svn r2287) - Fix (regression): cast stationcount to unsigned instead of p1 to signed when checking valid waypoint types. Thanks for pointing it out Tron diff -r 48749e4c2dc6 -r 7830a792ce70 waypoint.c --- a/waypoint.c Mon May 09 16:37:40 2005 +0000 +++ b/waypoint.c Mon May 09 19:56:08 2005 +0000 @@ -163,7 +163,7 @@ 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);