From ded0169f46dcdc2e5e258cf62902f09472e3b7cd Mon Sep 17 00:00:00 2001 From: Sylaina Date: Mon, 17 Sep 2018 18:15:06 +0200 Subject: [PATCH] Update lcd.c --- lcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lcd.c b/lcd.c index 1ec43cd..4f93026 100644 --- a/lcd.c +++ b/lcd.c @@ -216,7 +216,7 @@ void lcd_putc(char c){ for (uint8_t i = 0; i < sizeof(FONT[0]); i++) { // load bit-pattern from flash - displayBuffer[cursorPosition.x+i+((cursorPosition.x*sizeof(FONT[0]))+(cursorPosition.y*DISPLAY_WIDTH))] =pgm_read_byte(&(FONT[(uint8_t)c][i]));; + displayBuffer[cursorPosition.x+i+(cursorPosition.x*(sizeof(FONT[0])-1)+(cursorPosition.y*DISPLAY_WIDTH))] =pgm_read_byte(&(FONT[(uint8_t)c][i]));; } #elif defined TEXTMODE i2c_start(LCD_I2C_ADR << 1);