diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -222,7 +222,7 @@ CommandCost CmdBuildShipDepot(TileIndex if (flags & DC_EXEC) { Depot *depot = new Depot(tile); - depot->town_index = ClosestTownFromTile(tile, (uint)-1)->index; + depot->town_index = ClosestTownFromTile(tile, UINT_MAX)->index; MakeShipDepot(tile, _current_company, DEPOT_NORTH, axis, wc1); MakeShipDepot(tile2, _current_company, DEPOT_SOUTH, axis, wc2);