summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}
/**