summaryrefslogtreecommitdiff
path: root/rail.h
diff options
context:
space:
mode:
authormatthijs <matthijs@openttd.org>2006-08-15 11:06:32 +0000
committermatthijs <matthijs@openttd.org>2006-08-15 11:06:32 +0000
commit49b7b1e0eb25174a54e7687d09cb298a18af15da (patch)
tree3006cb19220cefd907d0aa233d805a6d650d4959 /rail.h
parentb13a60db4249e0f862da403bed6d9d2f90d17d06 (diff)
downloadopenttd-49b7b1e0eb25174a54e7687d09cb298a18af15da.tar.xz
(svn r5911) -Fix [FS#215]: Discard upper bits of TrackdirBitsToTrackBits result.
Diffstat (limited to 'rail.h')
-rw-r--r--rail.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/rail.h b/rail.h
index b3ce18798..ae24ea89b 100644
--- a/rail.h
+++ b/rail.h
@@ -296,7 +296,7 @@ static inline TrackdirBits TrackToTrackdirBits(Track track)
*/
static inline TrackBits TrackdirBitsToTrackBits(TrackdirBits bits)
{
- return (TrackBits)(bits | (bits >> 8));
+ return (TrackBits)((bits | (bits >> 8)) & TRACK_BIT_MASK);
}
/**