From 0670fb925362bafed3fc66dbc890bdaf9e2f1857 Mon Sep 17 00:00:00 2001 From: Knutwurst <36196269+knutwurst@users.noreply.github.com> Date: Fri, 2 Jun 2023 22:57:16 +0200 Subject: [PATCH] Revert from const char* to char* because it breaks Anycubic 1.0 without SD card. --- Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp b/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp index 33350a95..038f7843 100755 --- a/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp +++ b/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp @@ -885,7 +885,7 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) { #endif // The longname may not be filed, so we use the built-in fallback here. - const char* fileName = currentFileList.filename(); + char* fileName = strdup(currentFileList.filename()); int fileNameLen = strlen(fileName); // Cut off too long filenames.