summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-09-30 14:29:45 +0000
committerrubidium <rubidium@openttd.org>2007-09-30 14:29:45 +0000
commit32c0c3a64484fded063838b49b21a939dcafed97 (patch)
tree26f3bc62823a6a7eae45559b118e6343b715267a /src/industry_cmd.cpp
parent136d726b6fc8839779380c4af67e56a053a22be1 (diff)
downloadopenttd-32c0c3a64484fded063838b49b21a939dcafed97.tar.xz
(svn r11186) -Fix: only fill the accepted cargo fields once, not multiple times.
Diffstat (limited to 'src/industry_cmd.cpp')
-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];
}
}