From cc919ae8999635dc45e3852f1d2a07fd15784d48 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 5 Jan 2022 01:52:02 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20strlen=5FP=20parameter=20e?= =?UTF-8?q?rror?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #23447 --- Marlin/src/lcd/e3v2/enhanced/dwin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin.cpp b/Marlin/src/lcd/e3v2/enhanced/dwin.cpp index 3612fb6bd1..5b5ae7d228 100644 --- a/Marlin/src/lcd/e3v2/enhanced/dwin.cpp +++ b/Marlin/src/lcd/e3v2/enhanced/dwin.cpp @@ -295,7 +295,7 @@ void ICON_Button(const bool selected, const int iconid, const frame_rect_t &ico, DWIN_Frame_AreaCopy(1, txt.x, txt.y[selected], txt.x + txt.w - 1, txt.y[selected] + txt.h - 1, ico.x + (ico.w - txt.w) / 2, (ico.y + ico.h - 28) - txt.h/2); } else { - const uint16_t x = ico.x + (ico.w - strlen_P(caption)*DWINUI::fontWidth()) / 2, + const uint16_t x = ico.x + (ico.w - strlen_P(FTOP(caption)) * DWINUI::fontWidth()) / 2, y = (ico.y + ico.h - 28) - DWINUI::fontHeight() / 2; DWINUI::Draw_String(x, y, caption); }