Kaynağa Gözat

🐛 Fix strlen_P parameter error

Fixes #23447
Scott Lahteine 3 yıl önce
ebeveyn
işleme
cc919ae899
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1
    1
      Marlin/src/lcd/e3v2/enhanced/dwin.cpp

+ 1
- 1
Marlin/src/lcd/e3v2/enhanced/dwin.cpp Dosyayı Görüntüle

295
     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);
295
     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);
296
   }
296
   }
297
   else {
297
   else {
298
-    const uint16_t x = ico.x + (ico.w - strlen_P(caption)*DWINUI::fontWidth()) / 2,
298
+    const uint16_t x = ico.x + (ico.w - strlen_P(FTOP(caption)) * DWINUI::fontWidth()) / 2,
299
                    y = (ico.y + ico.h - 28) - DWINUI::fontHeight() / 2;
299
                    y = (ico.y + ico.h - 28) - DWINUI::fontHeight() / 2;
300
     DWINUI::Draw_String(x, y, caption);
300
     DWINUI::Draw_String(x, y, caption);
301
   }
301
   }

Loading…
İptal
Kaydet