mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Merge pull request #1336 from ChrisNisbet01/multiline_string_issue
Fixes issue where strings may be truncated unnecessarily.
This commit is contained in:
commit
d0a7d748c9
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)
|
void lcd_putsnAtt(xcoord_t x, uint8_t y, const pm_char * s, uint8_t len, LcdFlags mode)
|
||||||
{
|
{
|
||||||
xcoord_t orig_x = x;
|
xcoord_t orig_x = x;
|
||||||
|
uint8_t const orig_len = len;
|
||||||
bool setx = false;
|
bool setx = false;
|
||||||
while (len--) {
|
while (len--) {
|
||||||
unsigned char c;
|
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;
|
setx = true;
|
||||||
}
|
}
|
||||||
else if (c == 0x1E) { //NEWLINE
|
else if (c == 0x1E) { //NEWLINE
|
||||||
|
len = orig_len;
|
||||||
x = orig_x;
|
x = orig_x;
|
||||||
y += FH;
|
y += FH;
|
||||||
#if defined(CPUARM)
|
#if defined(CPUARM)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue