1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-28 22:35:21 +00:00

🩹 Handle nullptr in CardReader::printLongPath (#23197)

This commit is contained in:
Jason Smith 2021-11-27 13:54:39 -08:00 committed by GitHub
parent a3c4a5eca6
commit 1861f780de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -359,7 +359,7 @@ void CardReader::ls(TERN_(LONG_FILENAME_HOST_SUPPORT, bool includeLongNames/*=fa
//
void CardReader::printLongPath(char * const path) {
int i, pathLen = strlen(path);
int i, pathLen = path ? strlen(path) : 0;
// SERIAL_ECHOPGM("Full Path: "); SERIAL_ECHOLN(path);