mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-30 10:15:36 +01:00
Limit scrolling text colour to valid options (#9639)
This commit is contained in:
committed by
Michael Steenbeek
parent
382935c50f
commit
83e26804e5
@@ -153,6 +153,10 @@ static int32_t scrolling_text_get_matching_or_oldest(rct_string_id stringId, uin
|
||||
static uint8_t scrolling_text_get_colour(uint32_t character)
|
||||
{
|
||||
int32_t colour = character & 0x7F;
|
||||
if (colour >= COLOUR_COUNT)
|
||||
{
|
||||
colour = COLOUR_BLACK;
|
||||
}
|
||||
if (character & COLOUR_FLAG_TRANSLUCENT)
|
||||
{
|
||||
return ColourMapA[colour].light;
|
||||
|
||||
Reference in New Issue
Block a user