1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +01:00

Limit inline sprites to <= 32x32 (#16991)

This is to prevent abuse of the feature in the master server list.
This commit is contained in:
Ted John
2022-04-23 14:36:49 +01:00
committed by GitHub
parent 0377b2c002
commit 561dd13330

View File

@@ -759,7 +759,7 @@ static void ttf_process_format_code(rct_drawpixelinfo* dpi, const FmtString::tok
case FormatToken::InlineSprite:
{
auto g1 = gfx_get_g1_element(token.parameter & 0x7FFFF);
if (g1 != nullptr)
if (g1 != nullptr && g1->width <= 32 && g1->height <= 32)
{
if (!(info->flags & TEXT_DRAW_FLAG_NO_DRAW))
{