(svn r2779) -Fix: [clone vehicles] fixed typos, which could lead to crashes when cloning refitted trains (chrishuebsch)
authorbjarni
Mon, 01 Aug 2005 12:55:21 +0000
changeset 2259 895cde6156e6
parent 2258 501d3a212fb7
child 2260 10154bc4c650
(svn r2779) -Fix: [clone vehicles] fixed typos, which could lead to crashes when cloning refitted trains (chrishuebsch)
vehicle.c
--- a/vehicle.c	Mon Aug 01 12:51:50 2005 +0000
+++ b/vehicle.c	Mon Aug 01 12:55:21 2005 +0000
@@ -1778,7 +1778,7 @@
 			
 		}
 	}
-	if (flags && DC_EXEC && needs_refitting != 255 && v->type != VEH_Road) {	// right now we do not refit road vehicles
+	if (flags & DC_EXEC && needs_refitting != 255 && vfront->type != VEH_Road) {	// right now we do not refit road vehicles
 		if (DoCommandByTile(wfront->tile, wfront->index, needs_refitting, 0, refit_command) != CMD_ERROR)
 			DoCommandByTile(wfront->tile, wfront->index, needs_refitting, DC_EXEC, refit_command);
 	}