summaryrefslogtreecommitdiff
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
commit06e26ed2d32b96954a2f30d74db3d72edebb8519 (patch)
tree3006cb19220cefd907d0aa233d805a6d650d4959
parentb293c7a4e1af0821bb99f9f0bb72fe53e1c35a50 (diff)
downloadopenttd-06e26ed2d32b96954a2f30d74db3d72edebb8519.tar.xz
(svn r5911) -Fix [FS#215]: Discard upper bits of TrackdirBitsToTrackBits result.
-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);
}
/**