(svn r11461) -Fix [FS#1449] (r11449): a bus turning around in a station could case an assertion error. Patch by divide. 0.6.0-beta1
authorrubidium
Sun, 18 Nov 2007 15:06:01 +0000
changeset 8405 301456a669bd
parent 8404 6ded74cf94b9
child 8406 46a2346a6054
(svn r11461) -Fix [FS#1449] (r11449): a bus turning around in a station could case an assertion error. Patch by divide.
src/roadveh_cmd.cpp
--- a/src/roadveh_cmd.cpp	Sun Nov 18 14:57:14 2007 +0000
+++ b/src/roadveh_cmd.cpp	Sun Nov 18 15:06:01 2007 +0000
@@ -1682,8 +1682,8 @@
 
 		uint turn_around_start_frame = RVC_TURN_AROUND_START_FRAME;
 
-		RoadBits tram = GetRoadBits(v->tile, ROADTYPE_TRAM);
-		if (v->u.road.roadtype == ROADTYPE_TRAM && CountBits(tram) == 1) {
+		RoadBits tram;
+		if (v->u.road.roadtype == ROADTYPE_TRAM && CountBits(tram = GetRoadBits(v->tile, ROADTYPE_TRAM)) == 1) {
 			/*
 			 * The tram is turning around with one tram 'roadbit'. This means that
 			 * it is using the 'big' corner 'drive data'. However, to support the