diff --git a/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp b/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp index 591ff438ce..c978a07d0f 100644 --- a/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp +++ b/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp @@ -162,12 +162,12 @@ void MarlinUI::set_font(const MarlinFont font_nr) { // Determine text space needed #ifndef STRING_SPLASH_LINE2 constexpr uint8_t text_total_height = MENU_FONT_HEIGHT, - text_width_1 = (sizeof(STRING_SPLASH_LINE1) - 1) * (MENU_FONT_WIDTH), + text_width_1 = uint8_t(sizeof(STRING_SPLASH_LINE1) - 1) * uint8_t(MENU_FONT_WIDTH), text_width_2 = 0; #else - constexpr uint8_t text_total_height = (MENU_FONT_HEIGHT) * 2, - text_width_1 = (sizeof(STRING_SPLASH_LINE1) - 1) * (MENU_FONT_WIDTH), - text_width_2 = (sizeof(STRING_SPLASH_LINE2) - 1) * (MENU_FONT_WIDTH); + constexpr uint8_t text_total_height = uint8_t(MENU_FONT_HEIGHT) * 2, + text_width_1 = uint8_t(sizeof(STRING_SPLASH_LINE1) - 1) * uint8_t(MENU_FONT_WIDTH), + text_width_2 = uint8_t(sizeof(STRING_SPLASH_LINE2) - 1) * uint8_t(MENU_FONT_WIDTH); #endif constexpr uint8_t text_max_width = _MAX(text_width_1, text_width_2), rspace = width - (START_BMPWIDTH);