# HG changeset patch # User peter1138 # Date 2005-11-06 13:29:28 # Node ID 4f099f207a8b37319f279a70c8732354dcb5ad71 # Parent 598e8e448bec55f5a98c04b5dc764780d3e6be24 (svn r3147) Fix crash when building dual-head rail vehicles... diff --git a/train_cmd.c b/train_cmd.c --- a/train_cmd.c +++ b/train_cmd.c @@ -697,7 +697,7 @@ int32 CmdBuildRailVehicle(int x, int y, if (rvi->flags&RVI_MULTIHEAD && HASBIT(p2,0)) value /= 2; - num_vehicles = (rvi->flags & RVI_MULTIHEAD && HASBIT(p2, 0)) ? 2 : 1; + num_vehicles = (rvi->flags & RVI_MULTIHEAD && !HASBIT(p2, 0)) ? 2 : 1; num_vehicles += CountArticulatedParts(rvi, p1); if (!(flags & DC_QUERY_COST)) {