src/vehicle_gui.cpp
branchgamebalance
changeset 9913 e79cd19772dd
parent 9911 0b8b245a2391
--- a/src/vehicle_gui.cpp	Wed Jun 13 12:05:56 2007 +0000
+++ b/src/vehicle_gui.cpp	Tue Jun 19 07:21:01 2007 +0000
@@ -338,12 +338,12 @@
 			WP(w, refit_d).cargo = DrawVehicleRefitWindow(WP(w, refit_d).list, WP(w, refit_d).sel, w->vscroll.pos, w->vscroll.cap, w->resize.step_height);
 
 			if (WP(w, refit_d).cargo != NULL) {
-				int32 cost;
+				CommandCost cost;
 
 				cost = DoCommand(v->tile, v->index, WP(w, refit_d).cargo->cargo | WP(w, refit_d).cargo->subtype << 8,
 								 DC_QUERY_COST, GetCmdRefitVeh(GetVehicle(w->window_number)->type));
 
-				if (!CmdFailed(cost)) {
+				if (CmdSucceeded(cost)) {
 					SetDParam(0, WP(w, refit_d).cargo->cargo);
 					SetDParam(1, _returned_refit_capacity);
 					SetDParam(2, cost);