[AVR] Fix last column of last row of DBLSIZE text (off-by-one error)

This commit is contained in:
Michał Wróbel
2015-06-07 19:34:53 +02:00
parent 3b6322181c
commit bbf88744cb
4 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -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);
Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

+7
View File
@@ -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)
{