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

Fix #12944. Mistake from refactor meant formatter optimised away (#12961)

Not sure why it should get optimised away but this will fix the crashes.
This commit is contained in:
Duncan
2020-09-18 09:25:17 +01:00
committed by GitHub
parent c72f547606
commit da82144bfb
4 changed files with 8 additions and 4 deletions

View File

@@ -468,7 +468,8 @@ static void widget_groupbox_draw(rct_drawpixelinfo* dpi, rct_window* w, rct_widg
utf8 buffer[512] = { 0 };
format_string(buffer, sizeof(buffer), stringId, formatArgs);
auto ft = Formatter().Add<utf8*>(buffer);
auto ft = Formatter();
ft.Add<utf8*>(buffer);
gfx_draw_string_left(dpi, STR_STRING, ft.Data(), colour, { l, t });
textRight = l + gfx_get_string_width(buffer) + 1;
}