Browse Source

LCD filename already concatenated

Scott Lahteine 7 years ago
parent
commit
deeea98d22
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      Marlin/src/lcd/ultralcd_impl_HD44780.h

+ 1
- 2
Marlin/src/lcd/ultralcd_impl_HD44780.h View File

990
 
990
 
991
     static void lcd_implementation_drawmenu_sd(const bool sel, const uint8_t row, const char* const pstr, const char* filename, char* const longFilename, const uint8_t concat, const char post_char) {
991
     static void lcd_implementation_drawmenu_sd(const bool sel, const uint8_t row, const char* const pstr, const char* filename, char* const longFilename, const uint8_t concat, const char post_char) {
992
       UNUSED(pstr);
992
       UNUSED(pstr);
993
-      char c;
994
       uint8_t n = LCD_WIDTH - concat;
993
       uint8_t n = LCD_WIDTH - concat;
995
       lcd.setCursor(0, row);
994
       lcd.setCursor(0, row);
996
       lcd.print(sel ? '>' : ' ');
995
       lcd.print(sel ? '>' : ' ');
998
         filename = longFilename;
997
         filename = longFilename;
999
         longFilename[n] = '\0';
998
         longFilename[n] = '\0';
1000
       }
999
       }
1001
-      while ((c = *filename) && n > 0) {
1000
+      while (char c = *filename) {
1002
         n -= charset_mapper(c);
1001
         n -= charset_mapper(c);
1003
         filename++;
1002
         filename++;
1004
       }
1003
       }

Loading…
Cancel
Save