(svn r11186) -Fix: only fill the accepted cargo fields once, not multiple times.
authorrubidium
Sun, 30 Sep 2007 14:29:45 +0000
changeset 7655 314256ffab9d
parent 7654 533a9c9a5e83
child 7656 2c4110e04e37
(svn r11186) -Fix: only fill the accepted cargo fields once, not multiple times.
src/industry_cmd.cpp
--- a/src/industry_cmd.cpp	Fri Sep 28 21:24:25 2007 +0000
+++ b/src/industry_cmd.cpp	Sun Sep 30 14:29:45 2007 +0000
@@ -358,7 +358,8 @@
 
 	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];
 	}
 }