summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/industry_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index c12ac659c..1816adc4c 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -358,7 +358,8 @@ static void GetAcceptedCargo_Industry(TileIndex tile, AcceptedCargo ac)
for (byte i = 0; i < lengthof(itspec->accepts_cargo); i++) {
CargoID a = accepts_cargo[i];
- if (a != CT_INVALID) ac[a] = acceptance[i];
+ /* Only set the value once. */
+ if (a != CT_INVALID && ac[a] == 0) ac[a] = acceptance[i];
}
}