From d8ab61cab3286faebda896dcf545599f41ab3ef1 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Wed, 6 Jun 2018 08:28:50 +0100 Subject: [PATCH] Change type of track bits mask in MaskWireBits This is to fix warnings from UndefinedBehaviorSanitizer. --- src/elrail.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/elrail.cpp b/src/elrail.cpp index 9fdfb57a3d..37ac9f90bd 100644 --- a/src/elrail.cpp +++ b/src/elrail.cpp @@ -146,7 +146,7 @@ static TrackBits MaskWireBits(TileIndex t, TrackBits tracks) /* If the tracks from either a diagonal crossing or don't overlap, both * trackdirs have to be marked to mask the corresponding track bit. Else * one marked trackdir is enough the mask the track bit. */ - TrackBits mask; + TrackBitsByte mask; if (tracks == TRACK_BIT_CROSS || !TracksOverlap(tracks)) { /* If the tracks form either a diagonal crossing or don't overlap, both * trackdirs have to be marked to mask the corresponding track bit. */