changeset 7909:4deac6dc5764 draft

(svn r11461) -Fix [FS#1449] (r11449): a bus turning around in a station could case an assertion error. Patch by divide.
author rubidium <rubidium@openttd.org>
date Sun, 18 Nov 2007 15:06:01 +0000
parents 7519c50587e5
children 4e0322d86051
files src/roadveh_cmd.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -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