(svn r3147) Fix crash when building dual-head rail vehicles...
authorpeter1138
Sun, 06 Nov 2005 13:29:28 +0000
changeset 2610 044cb4ffc6f7
parent 2609 b2c7aa8ce0c4
child 2611 65b5313bc525
(svn r3147) Fix crash when building dual-head rail vehicles...
train_cmd.c
--- a/train_cmd.c	Sun Nov 06 12:39:30 2005 +0000
+++ b/train_cmd.c	Sun Nov 06 13:29:28 2005 +0000
@@ -697,7 +697,7 @@
 	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)) {