mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Fixes issue where strings may be truncated unnecessarily.
If the string spans multiple lines (contains character 0x1E), the limit on the line's length should be set back to the original value.
This commit is contained in:
parent
88c4c11b56
commit
9fe49846c5
1 changed files with 2 additions and 0 deletions
|
@ -337,6 +337,7 @@ void lcd_putc(xcoord_t x, uint8_t y, const unsigned char c)
|
|||
void lcd_putsnAtt(xcoord_t x, uint8_t y, const pm_char * s, uint8_t len, LcdFlags mode)
|
||||
{
|
||||
xcoord_t orig_x = x;
|
||||
uint8_t const orig_len = len;
|
||||
bool setx = false;
|
||||
while (len--) {
|
||||
unsigned char c;
|
||||
|
@ -373,6 +374,7 @@ void lcd_putsnAtt(xcoord_t x, uint8_t y, const pm_char * s, uint8_t len, LcdFlag
|
|||
setx = true;
|
||||
}
|
||||
else if (c == 0x1E) { //NEWLINE
|
||||
len = orig_len;
|
||||
x = orig_x;
|
||||
y += FH;
|
||||
#if defined(CPUARM)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue