From 8256cfe1741446fced2db8f90057c20851a270be Mon Sep 17 00:00:00 2001 From: Marcio Teixeira Date: Tue, 14 Nov 2017 15:33:29 -0700 Subject: [PATCH] Fix for corrupted error messages on temp error. - Ultralcd stores a pointer to the buffer passed into it, so this buffer cannot be stored on the stack. --- Marlin/Conditionals_LulzBot.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Marlin/Conditionals_LulzBot.h b/Marlin/Conditionals_LulzBot.h index 2bbf3ed11..686648cec 100644 --- a/Marlin/Conditionals_LulzBot.h +++ b/Marlin/Conditionals_LulzBot.h @@ -13,7 +13,7 @@ * got disabled. */ -#define LULZBOT_FW_VERSION ".32" // Change this with each update +#define LULZBOT_FW_VERSION ".33" // Change this with each update #if ( \ !defined(LULZBOT_Gladiola_Mini) && \ @@ -1625,13 +1625,14 @@ #define LULZBOT_REORDERED_MENUS #define LULZBOT_ENHANCED_TEMP_ERROR_MSG(msg, e) \ { \ - char str[30] = {'\0'}; \ + /* Must be static since the ultralcd code */ \ + /* will hold a pointer to this buffer */ \ + static char str[30] = {'\0'}; \ strncpy(str, msg, 25); \ switch(e) { \ case -1: strcat(str, " BED"); break; \ case 0: strcat(str, " E0"); break; \ case 1: strcat(str, " E1"); break; \ - break; \ } \ kill(str); \ }