Przeglądaj źródła

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.
benlye 8 lat temu
rodzic
commit
8c6b4537a6
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1
    1
      Marlin/utility.cpp

+ 1
- 1
Marlin/utility.cpp Wyświetl plik

87
         conv[5] = DIGIMOD(xx, 10);
87
         conv[5] = DIGIMOD(xx, 10);
88
       }
88
       }
89
       else {
89
       else {
90
+        conv[3] = ' ';
90
         conv[4] = ' ';
91
         conv[4] = ' ';
91
         if (xx >= 10) {
92
         if (xx >= 10) {
92
           conv[4] = neg ? '-' : ' ';
93
           conv[4] = neg ? '-' : ' ';
93
           conv[5] = DIGIMOD(xx, 10);
94
           conv[5] = DIGIMOD(xx, 10);
94
         }
95
         }
95
         else {
96
         else {
96
-          conv[4] = ' ';
97
           conv[5] = neg ? '-' : ' ';
97
           conv[5] = neg ? '-' : ' ';
98
         }
98
         }
99
       }
99
       }

Ładowanie…
Anuluj
Zapisz