From 8c6b4537a65ec55d13285a9df2b01d1bc4a902f2 Mon Sep 17 00:00:00 2001 From: benlye Date: Fri, 28 Apr 2017 19:35:11 +0100 Subject: [PATCH] Fix issue in itostr4sign with numbers <100 (#6487) The first character in the string wasn't blanked if the number went from >= 100 to <100, resulting in artefacts in the displayed string. --- Marlin/utility.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/utility.cpp b/Marlin/utility.cpp index 11e499f16f..420fa6e6e3 100644 --- a/Marlin/utility.cpp +++ b/Marlin/utility.cpp @@ -87,13 +87,13 @@ void safe_delay(millis_t ms) { conv[5] = DIGIMOD(xx, 10); } else { + conv[3] = ' '; conv[4] = ' '; if (xx >= 10) { conv[4] = neg ? '-' : ' '; conv[5] = DIGIMOD(xx, 10); } else { - conv[4] = ' '; conv[5] = neg ? '-' : ' '; } }