From 78f856c8d6dd0dbc7d259f45679a8b85d7c2cb01 Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Tue, 7 Dec 2021 16:56:39 +0100 Subject: [PATCH] Do not unconditionally overwrite the status message in check_file() No function should touch the status message directly without checking the message severity level first. Replace the strcpy_P with lcd_setstatuspgm(). --- Firmware/ultralcd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 81f0097c..e88e2285 100755 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -8593,7 +8593,7 @@ static bool check_file(const char* filename) { cmdqueue_serial_disabled = false; card.printingHasFinished(); - strncpy_P(lcd_status_message, _T(WELCOME_MSG), LCD_WIDTH); + lcd_setstatuspgm(_T(WELCOME_MSG)); lcd_finishstatus(); return result; }