|
@@ -918,14 +918,15 @@ static void lcd_implementation_status_screen() {
|
918
|
918
|
if (!PAGE_CONTAINS(row_y1, row_y2)) return;
|
919
|
919
|
|
920
|
920
|
uint8_t n = LCD_WIDTH - (START_COL) - 1;
|
|
921
|
+ char c;
|
921
|
922
|
if (longFilename[0]) {
|
922
|
923
|
filename = longFilename;
|
923
|
|
- longFilename[n] = '\0';
|
|
924
|
+ longFilename[n] = '\0'; // cutoff at screen edge
|
924
|
925
|
}
|
925
|
926
|
|
926
|
927
|
if (isDir) lcd_print(LCD_STR_FOLDER[0]);
|
927
|
928
|
|
928
|
|
- while (char c = *filename) {
|
|
929
|
+ while ((c = *filename) && n > 0) {
|
929
|
930
|
n -= lcd_print_and_count(c);
|
930
|
931
|
filename++;
|
931
|
932
|
}
|