summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2005-11-06 13:29:28 +0000
committerpeter1138 <peter1138@openttd.org>2005-11-06 13:29:28 +0000
commit220b4c27c1f8f58740ae4195e71f5e582a8474d0 (patch)
tree64a9d3a79461f5f4ddf22687d5d9c3cc85f8449c
parentb58cfc36daeaa169349170e3f7ca0e1c06a039c2 (diff)
downloadopenttd-220b4c27c1f8f58740ae4195e71f5e582a8474d0.tar.xz
(svn r3147) Fix crash when building dual-head rail vehicles...
-rw-r--r--train_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 04dee12b2..58100e871 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)) {