From 1f5572fe28e003ef3a7469b76d63844ef77a8482 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sat, 16 Jun 2018 15:41:18 +0200 Subject: [PATCH] Fix #7701: Strings overflow in drawing debug windows. (#7702) The last widget was not taken into account. --- src/openrct2-ui/windows/DebugPaint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2-ui/windows/DebugPaint.cpp b/src/openrct2-ui/windows/DebugPaint.cpp index 03e4f5e063..3a4eeb4d8b 100644 --- a/src/openrct2-ui/windows/DebugPaint.cpp +++ b/src/openrct2-ui/windows/DebugPaint.cpp @@ -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);