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.
This commit is contained in:
benlye 2017-04-28 19:35:11 +01:00 committed by Roxy-3D
parent 4075b95519
commit 8c6b4537a6

View file

@ -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 ? '-' : ' ';
}
}