diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -786,8 +786,8 @@ CommandCost CmdCloneVehicle(TileIndex ti } } - if (w->IsGroundVehicle() && w->HasArticulatedPart()) { - w = w->GetNextArticulatedPart(); + if (v->IsGroundVehicle() && v->HasArticulatedPart()) { + v = v->GetNextArticulatedPart(); } else { break; }