summaryrefslogtreecommitdiff
path: root/order_gui.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-10-08 21:10:00 +0000
committerbjarni <bjarni@openttd.org>2006-10-08 21:10:00 +0000
commitec809c5d71cf9ccb37d8ebe04c583d2fe566af9e (patch)
tree85ecb9df403ac4ad8bb2337845ec134da965c837 /order_gui.c
parentfa3afe220edc938f19b4368cd1edb0d1d52e71a8 (diff)
downloadopenttd-ec809c5d71cf9ccb37d8ebe04c583d2fe566af9e.tar.xz
(svn r6696) -Codechange: changed all comparision for refit cargo in orders against CT_NO_REFIT to checks for valid cargo IDs
This should prevent any bugs made by mixing up CT_NO_REFIT and CT_INVALID
Diffstat (limited to 'order_gui.c')
-rw-r--r--order_gui.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/order_gui.c b/order_gui.c
index 532005da1..bf53ff958 100644
--- a/order_gui.c
+++ b/order_gui.c
@@ -170,11 +170,11 @@ static void DrawOrdersWindow(Window *w)
if (order->flags & OF_FULL_LOAD) s++; /* service at */
SetDParam(1, s);
- if (order->refit_cargo == CT_NO_REFIT) {
- SetDParam(3, STR_EMPTY);
- } else {
+ if (order->refit_cargo < NUM_CARGO) {
SetDParam(3, STR_REFIT_ORDER);
SetDParam(4, _cargoc.names_s[order->refit_cargo]);
+ } else {
+ SetDParam(3, STR_EMPTY);
}
break;
}