|
@@ -928,14 +928,15 @@ static void lcd_implementation_status_screen() {
|
928
|
928
|
if (!PAGE_CONTAINS(row_y1, row_y2)) return;
|
929
|
929
|
|
930
|
930
|
uint8_t n = LCD_WIDTH - (START_COL) - 1;
|
|
931
|
+ char c;
|
931
|
932
|
if (longFilename[0]) {
|
932
|
933
|
filename = longFilename;
|
933
|
|
- longFilename[n] = '\0';
|
|
934
|
+ longFilename[n] = '\0'; // cutoff at screen edge
|
934
|
935
|
}
|
935
|
936
|
|
936
|
937
|
if (isDir) lcd_print(LCD_STR_FOLDER[0]);
|
937
|
938
|
|
938
|
|
- while (char c = *filename) {
|
|
939
|
+ while ((c = *filename) && n > 0) {
|
939
|
940
|
n -= lcd_print_and_count(c);
|
940
|
941
|
filename++;
|
941
|
942
|
}
|