src/industry_cmd.cpp
changeset 9321 61fd5b6e27ce
parent 9306 7dd0a9130ebf
child 9322 cf7dc39f9576
--- a/src/industry_cmd.cpp	Tue May 20 21:55:45 2008 +0000
+++ b/src/industry_cmd.cpp	Wed May 21 12:06:05 2008 +0000
@@ -1953,10 +1953,9 @@
 		bool c_accepts = false;
 		bool c_produces = false;
 		if (v->type == VEH_TRAIN && IsFrontEngine(v)) {
-			const Vehicle *u = v;
-			BEGIN_ENUM_WAGONS(u)
+			for (const Vehicle *u = v; u != NULL; u = u->Next()) {
 				CanCargoServiceIndustry(u->cargo_type, ind, &c_accepts, &c_produces);
-			END_ENUM_WAGONS(u)
+			}
 		} else if (v->type == VEH_ROAD || v->type == VEH_SHIP || v->type == VEH_AIRCRAFT) {
 			CanCargoServiceIndustry(v->cargo_type, ind, &c_accepts, &c_produces);
 		} else {