From b21b25ddf9298a80e576e33872de9a9bdf46bbe2 Mon Sep 17 00:00:00 2001 From: Knutwurst <36196269+knutwurst@users.noreply.github.com> Date: Fri, 9 Jun 2023 22:50:42 +0200 Subject: [PATCH] Add initialization to OutputString. You never know. --- Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp b/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp index 3467ddd5..f4407f75 100755 --- a/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp +++ b/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp @@ -924,9 +924,9 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) { fileNameWasCut = true; fileNameLen = MAX_PRINTABLE_FILENAME_LEN; } - char outputString[MAX_PRINTABLE_FILENAME_LEN]; + char outputString[MAX_PRINTABLE_FILENAME_LEN] = {'\0'}; #else - char outputString[fileNameLen]; + char outputString[fileNameLen] = {'\0'}; #endif // Bugfix for non-printable special characters