diff options
-rw-r--r-- | src/autoreplace_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index 1a8ac4393..f4c7c9c81 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -123,7 +123,7 @@ static CargoID GetNewCargoTypeForReplace(Vehicle *v, EngineID engine_type) /* Do we have to refit the vehicle, or is it already carrying the right cargo? */ uint16 *default_capacity = GetCapacityOfArticulatedParts(engine_type, v->type); for (CargoID cid = 0; cid < NUM_CARGO; cid++) { - if (cid != cargo_type && default_capacity[cid] > 0) return cargo_type; + if (cid != v->cargo_type && default_capacity[cid] > 0) return v->cargo_type; } return CT_NO_REFIT; |