From cf0611a7d9259fc21b0bd309e90a69c5ffcd9fcb Mon Sep 17 00:00:00 2001 From: Knutwurst <36196269+knutwurst@users.noreply.github.com> Date: Tue, 30 May 2023 17:33:39 +0200 Subject: [PATCH] Use const char* because it's not altered past that point. --- 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 619c471b..8dc98eca 100755 --- a/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp +++ b/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp @@ -983,7 +983,7 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) { */ // The longname may not be filed, so we use the built-in fallback here. - char* fileName = strdup(currentFileList.filename()); + const char* fileName = currentFileList.filename(); int fileNameLen = strlen(fileName); bool fileNameWasCut = false;