1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 08:12:53 +01:00

Fix #7701: Strings overflow in drawing debug windows. (#7702)

The last widget was not taken into account.
This commit is contained in:
Aaron van Geffen
2018-06-16 15:41:18 +02:00
committed by Ted John
parent 26666b1da9
commit 1f5572fe28

View File

@@ -157,7 +157,7 @@ static void window_debug_paint_invalidate(rct_window * w)
// Find the width of the longest string
sint16 newWidth = 0;
for (size_t widgetIndex = WIDX_TOGGLE_SHOW_WIDE_PATHS; widgetIndex < WIDX_TOGGLE_SHOW_DIRTY_VISUALS; widgetIndex++)
for (size_t widgetIndex = WIDX_TOGGLE_SHOW_WIDE_PATHS; widgetIndex <= WIDX_TOGGLE_SHOW_DIRTY_VISUALS; widgetIndex++)
{
auto stringIdx = w->widgets[widgetIndex].text;
auto string = ls.GetString(stringIdx);