Use const char* because it's not altered past that point.

This commit is contained in:
Knutwurst
2023-05-30 17:33:39 +02:00
parent 9c4c58235b
commit cf0611a7d9

View File

@@ -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;