Use const char* because it's not altered past that point.
This commit is contained in:
@@ -983,7 +983,7 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// The longname may not be filed, so we use the built-in fallback here.
|
// 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);
|
int fileNameLen = strlen(fileName);
|
||||||
bool fileNameWasCut = false;
|
bool fileNameWasCut = false;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user