summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-05-24 11:39:35 +0000
committerfrosch <frosch@openttd.org>2009-05-24 11:39:35 +0000
commit033748528492fe64b3a5743cebbdcea663188134 (patch)
tree39572eca276c28cd657d17bc98188e3b0e8a34ef /src
parent299f34b32bfb2dbaba2dd0cb8865a16afefa2e85 (diff)
downloadopenttd-033748528492fe64b3a5743cebbdcea663188134.tar.xz
(svn r16411) -Fix (r16390): Building articulated roadvehicles caused infinite loop due to v->Next() pointing to v itself.
Diffstat (limited to 'src')
-rw-r--r--src/articulated_vehicles.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp
index 1407ad9d3..d01118acf 100644
--- a/src/articulated_vehicles.cpp
+++ b/src/articulated_vehicles.cpp
@@ -333,7 +333,7 @@ void AddArticulatedParts(Vehicle *first, VehicleType type)
RoadVehicle *front = (RoadVehicle *)v;
RoadVehicle *rv = new RoadVehicle();
rv->subtype = 0;
- previous->SetNext(u);
+ previous->SetNext(rv);
rv->rcache.first_engine = front->engine_type;
rv->rcache.cached_veh_length = 8; // Callback is called when the consist is finished
rv->state = RVSB_IN_DEPOT;