From 561dd1333075398126bd15230eb67706c6a68838 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 23 Apr 2022 14:36:49 +0100 Subject: [PATCH] Limit inline sprites to <= 32x32 (#16991) This is to prevent abuse of the feature in the master server list. --- src/openrct2/drawing/Drawing.String.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2/drawing/Drawing.String.cpp b/src/openrct2/drawing/Drawing.String.cpp index 308c2379c0..e1c7a7ad75 100644 --- a/src/openrct2/drawing/Drawing.String.cpp +++ b/src/openrct2/drawing/Drawing.String.cpp @@ -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)) {