summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vehicle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vehicle.c b/vehicle.c
index 799d53d4e..2492a2378 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -1655,7 +1655,7 @@ Vehicle * MaybeReplaceVehicle(Vehicle *v)
} while (w->type == VEH_Train && (w=w->next) != NULL);
if (!(flags & DC_EXEC) && (CmdFailed(temp_cost) || p->money64 < (int32)(cost + p->engine_renew_money) || cost == 0)) {
- if (p->money64 < (int32)(cost + p->engine_renew_money) && ( _local_player == v->owner )) {
+ if (p->money64 < (int32)(cost + p->engine_renew_money) && ( _local_player == v->owner ) && cost != 0) {
StringID message;
SetDParam(0, v->unitnumber);
switch (v->type) {