|
@@ -503,7 +503,7 @@ static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, c
|
503
|
503
|
#endif
|
504
|
504
|
lcd.setCursor(0, row);
|
505
|
505
|
lcd.print(pre_char);
|
506
|
|
- while((c = pgm_read_byte(pstr)) != '\0')
|
|
506
|
+ while( ((c = pgm_read_byte(pstr)) != '\0') && (n>0) )
|
507
|
507
|
{
|
508
|
508
|
lcd.print(c);
|
509
|
509
|
pstr++;
|
|
@@ -525,7 +525,7 @@ static void lcd_implementation_drawmenu_setting_edit_generic(uint8_t row, const
|
525
|
525
|
#endif
|
526
|
526
|
lcd.setCursor(0, row);
|
527
|
527
|
lcd.print(pre_char);
|
528
|
|
- while((c = pgm_read_byte(pstr)) != '\0')
|
|
528
|
+ while( ((c = pgm_read_byte(pstr)) != '\0') && (n>0) )
|
529
|
529
|
{
|
530
|
530
|
lcd.print(c);
|
531
|
531
|
pstr++;
|
|
@@ -547,7 +547,7 @@ static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, cons
|
547
|
547
|
#endif
|
548
|
548
|
lcd.setCursor(0, row);
|
549
|
549
|
lcd.print(pre_char);
|
550
|
|
- while((c = pgm_read_byte(pstr)) != '\0')
|
|
550
|
+ while( ((c = pgm_read_byte(pstr)) != '\0') && (n>0) )
|
551
|
551
|
{
|
552
|
552
|
lcd.print(c);
|
553
|
553
|
pstr++;
|
|
@@ -617,7 +617,7 @@ static void lcd_implementation_drawmenu_sdfile_selected(uint8_t row, const char*
|
617
|
617
|
filename = longFilename;
|
618
|
618
|
longFilename[LCD_WIDTH-1] = '\0';
|
619
|
619
|
}
|
620
|
|
- while((c = *filename) != '\0')
|
|
620
|
+ while( ((c = *filename) != '\0') && (n>0) )
|
621
|
621
|
{
|
622
|
622
|
lcd.print(c);
|
623
|
623
|
filename++;
|
|
@@ -637,7 +637,7 @@ static void lcd_implementation_drawmenu_sdfile(uint8_t row, const char* pstr, co
|
637
|
637
|
filename = longFilename;
|
638
|
638
|
longFilename[LCD_WIDTH-1] = '\0';
|
639
|
639
|
}
|
640
|
|
- while((c = *filename) != '\0')
|
|
640
|
+ while( ((c = *filename) != '\0') && (n>0) )
|
641
|
641
|
{
|
642
|
642
|
lcd.print(c);
|
643
|
643
|
filename++;
|
|
@@ -658,7 +658,7 @@ static void lcd_implementation_drawmenu_sddirectory_selected(uint8_t row, const
|
658
|
658
|
filename = longFilename;
|
659
|
659
|
longFilename[LCD_WIDTH-2] = '\0';
|
660
|
660
|
}
|
661
|
|
- while((c = *filename) != '\0')
|
|
661
|
+ while( ((c = *filename) != '\0') && (n>0) )
|
662
|
662
|
{
|
663
|
663
|
lcd.print(c);
|
664
|
664
|
filename++;
|
|
@@ -679,7 +679,7 @@ static void lcd_implementation_drawmenu_sddirectory(uint8_t row, const char* pst
|
679
|
679
|
filename = longFilename;
|
680
|
680
|
longFilename[LCD_WIDTH-2] = '\0';
|
681
|
681
|
}
|
682
|
|
- while((c = *filename) != '\0')
|
|
682
|
+ while( ((c = *filename) != '\0') && (n>0) )
|
683
|
683
|
{
|
684
|
684
|
lcd.print(c);
|
685
|
685
|
filename++;
|