mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-17 20:13:07 +01:00
Fix #6514: Groupbox titles break format arguments
This commit is contained in:
committed by
Michael Steenbeek
parent
ce0650daf5
commit
bcb6b83a7d
@@ -538,10 +538,12 @@ static void widget_groupbox_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widg
|
||||
if (widget_is_disabled(w, widgetIndex))
|
||||
colour |= 0x40;
|
||||
|
||||
format_string(gCommonStringFormatBuffer, sizeof(gCommonStringFormatBuffer), widget->text, gCommonFormatArgs);
|
||||
set_format_arg(0, uintptr_t, gCommonStringFormatBuffer);
|
||||
gfx_draw_string_left(dpi, STR_STRING, gCommonFormatArgs, colour, l, t);
|
||||
textRight = l + gfx_get_string_width(gCommonStringFormatBuffer) + 1;
|
||||
utf8 buffer[512] = { 0 };
|
||||
uint8 args[sizeof(uintptr_t)] = { 0 };
|
||||
format_string(buffer, sizeof(buffer), widget->text, gCommonFormatArgs);
|
||||
set_format_arg_on(args, 0, uintptr_t, buffer);
|
||||
gfx_draw_string_left(dpi, STR_STRING, args, colour, l, t);
|
||||
textRight = l + gfx_get_string_width(buffer) + 1;
|
||||
}
|
||||
|
||||
// Border
|
||||
|
||||
Reference in New Issue
Block a user