diff --git a/radio/src/gui/9X/lcd.cpp b/radio/src/gui/9X/lcd.cpp index 41654e39d..cfdb18dc0 100755 --- a/radio/src/gui/9X/lcd.cpp +++ b/radio/src/gui/9X/lcd.cpp @@ -1181,7 +1181,7 @@ void lcd_putcAtt(coord_t x, uint8_t y, const unsigned char c, LcdFlags flags) b1 = ~b1; b2 = ~b2; } - if(&p[LCD_W+1] < DISPLAY_END) { + if(p+LCD_W < DISPLAY_END) { ASSERT_IN_DISPLAY(p); ASSERT_IN_DISPLAY(p+LCD_W); LCD_BYTE_FILTER(p, 0, b1); diff --git a/radio/src/tests/dblsize_bottom_right_128x64.png b/radio/src/tests/dblsize_bottom_right_128x64.png new file mode 100644 index 000000000..d77b7e4c8 Binary files /dev/null and b/radio/src/tests/dblsize_bottom_right_128x64.png differ diff --git a/radio/src/tests/dblsize_bottom_right_212x64.png b/radio/src/tests/dblsize_bottom_right_212x64.png new file mode 100644 index 000000000..9622f2412 Binary files /dev/null and b/radio/src/tests/dblsize_bottom_right_212x64.png differ diff --git a/radio/src/tests/lcd.cpp b/radio/src/tests/lcd.cpp index 60a8f00b0..e3cebfbf3 100644 --- a/radio/src/tests/lcd.cpp +++ b/radio/src/tests/lcd.cpp @@ -174,6 +174,13 @@ TEST(Lcd, Line_Wrap) EXPECT_TRUE(checkScreenshot("line_wrap")); } +TEST(Lcd, DblsizeBottomRight) +{ + lcd_clear(); + lcd_putsAtt(LCD_W-20, LCD_H-16, "TEST", DBLSIZE); + EXPECT_TRUE(checkScreenshot("dblsize_bottom_right")); +} + #if defined(CPUARM) TEST(Lcd, Smlsize_putsStrIdx) {