(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
This commit is contained in:
bjarni
2006-10-08 21:10:00 +00:00
parent fa3afe220e
commit ec809c5d71
2 changed files with 5 additions and 5 deletions

View File

@@ -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;
}