summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-10-25 22:00:51 +0000
committerfrosch <frosch@openttd.org>2008-10-25 22:00:51 +0000
commite0a66cf7a9e875cb792995afc1d1f43ec48a70c9 (patch)
tree278c186d495c24d145ab5754fb4d0214701a4bcc /src
parente65be653f53d64017c4eb02517ffc60b967823a7 (diff)
downloadopenttd-e0a66cf7a9e875cb792995afc1d1f43ec48a70c9.tar.xz
(svn r14536) -Fix (r14530): Do not expect uints to become negative.
Diffstat (limited to 'src')
-rw-r--r--src/economy.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index 25a635602..f933c80cb 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1298,12 +1298,12 @@ static void DeliverGoodsToIndustry(const Station *st, CargoID cargo_type, int nu
if (st->rect.IsEmpty()) return;
/* Compute acceptance rectangle */
- uint catchment_radius = st->GetCatchmentRadius();
+ int catchment_radius = st->GetCatchmentRadius();
Rect rect = {
- max(st->rect.left - catchment_radius, 0u),
- max(st->rect.top - catchment_radius, 0u),
- min(st->rect.right + catchment_radius, MapMaxX()),
- min(st->rect.bottom + catchment_radius, MapMaxY())
+ max<int>(st->rect.left - catchment_radius, 0),
+ max<int>(st->rect.top - catchment_radius, 0),
+ min<int>(st->rect.right + catchment_radius, MapMaxX()),
+ min<int>(st->rect.bottom + catchment_radius, MapMaxY())
};
/* Compute maximum extent of acceptance rectangle wrt. station sign */