From 9fe49846c52e7d6f861cec771d5b7f67dd3e5b2a Mon Sep 17 00:00:00 2001 From: Chris Nisbet Date: Sat, 21 Jun 2014 14:50:44 +1200 Subject: [PATCH] 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. --- radio/src/lcd.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/radio/src/lcd.cpp b/radio/src/lcd.cpp index c09853592..da12a667d 100644 --- a/radio/src/lcd.cpp +++ b/radio/src/lcd.cpp @@ -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)