summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-11-18 15:06:01 +0000
committerrubidium <rubidium@openttd.org>2007-11-18 15:06:01 +0000
commitb1393d1169bebbf2b9604a5fc570ac6e60082e84 (patch)
tree8d1c64b45f3b8a1557ac637250cb2f5e013b08ea /src
parent56f332fafdcbae793ddddf9e9168b02609b16f49 (diff)
downloadopenttd-b1393d1169bebbf2b9604a5fc570ac6e60082e84.tar.xz
(svn r11461) -Fix [FS#1449] (r11449): a bus turning around in a station could case an assertion error. Patch by divide.
Diffstat (limited to 'src')
-rw-r--r--src/roadveh_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 0927c69a9..c7bcffc77 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1682,8 +1682,8 @@ again:
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