1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 21:43:06 +01:00

Only guard font access in RCT2-less builds

This commit is contained in:
Michał Janiszewski
2017-11-26 21:48:54 +01:00
parent 8097beeae1
commit 9fcef9ed07

View File

@@ -124,7 +124,9 @@ sint32 font_sprite_get_codepoint_offset(sint32 codepoint)
sint32 font_sprite_get_codepoint_width(sint32 fontSpriteBase, sint32 codepoint)
{
uint32 spriteFontIdx = fontSpriteBase + font_sprite_get_codepoint_offset(codepoint);
#ifdef NO_RCT2
openrct2_assert(spriteFontIdx < countof(_spriteFontCharacterWidths), "Invalid font index %u", spriteFontIdx);
#endif
return _spriteFontCharacterWidths[spriteFontIdx];
}