Browse Source

LCD filename already concatentated

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

+ 1
- 2
Marlin/ultralcd_impl_HD44780.h View File

987
 
987
 
988
     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) {
988
     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) {
989
       UNUSED(pstr);
989
       UNUSED(pstr);
990
-      char c;
991
       uint8_t n = LCD_WIDTH - concat;
990
       uint8_t n = LCD_WIDTH - concat;
992
       lcd.setCursor(0, row);
991
       lcd.setCursor(0, row);
993
       lcd.print(sel ? '>' : ' ');
992
       lcd.print(sel ? '>' : ' ');
995
         filename = longFilename;
994
         filename = longFilename;
996
         longFilename[n] = '\0';
995
         longFilename[n] = '\0';
997
       }
996
       }
998
-      while ((c = *filename) && n > 0) {
997
+      while (char c = *filename) {
999
         n -= charset_mapper(c);
998
         n -= charset_mapper(c);
1000
         filename++;
999
         filename++;
1001
       }
1000
       }

Loading…
Cancel
Save