From dcd2fa92919a6cf23d1762bd2b2461c95544bf4b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 7 Mar 2018 21:58:19 -0600 Subject: [PATCH] Fix compile error with MAX_MESSAGE_LENGTH Fix #9988 --- Marlin/ultralcd.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index dcb9e23d4..846e7f2e1 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -85,7 +85,11 @@ uint8_t lcd_status_update_delay = 1, // First update one loop delayed lcd_status_message_level; // Higher level blocks lower level #if ENABLED(STATUS_MESSAGE_SCROLLING) - #define MAX_MESSAGE_LENGTH max(CHARSIZE * 2 * (LCD_WIDTH), LONG_FILENAME_LENGTH) + #if LONG_FILENAME_LENGTH > CHARSIZE * 2 * (LCD_WIDTH) + #define MAX_MESSAGE_LENGTH LONG_FILENAME_LENGTH + #else + #define MAX_MESSAGE_LENGTH CHARSIZE * 2 * (LCD_WIDTH) + #endif uint8_t status_scroll_pos = 0; #else #define MAX_MESSAGE_LENGTH CHARSIZE * (LCD_WIDTH)