From 220b4c27c1f8f58740ae4195e71f5e582a8474d0 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sun, 6 Nov 2005 13:29:28 +0000 Subject: [PATCH] (svn r3147) Fix crash when building dual-head rail vehicles... --- train_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train_cmd.c b/train_cmd.c index 04dee12b26..58100e8714 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -697,7 +697,7 @@ int32 CmdBuildRailVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2) 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)) {