From 8ca4ed9a987f9e7815a813592a0210c4853386e6 Mon Sep 17 00:00:00 2001 From: Brian Mock Date: Sat, 9 May 2020 20:14:07 -0700 Subject: Fix off by one error with oled_write_raw_P (#9045) --- drivers/oled/oled_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/oled') diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index ce5c23cc40..eedaedcd36 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c @@ -479,7 +479,7 @@ void oled_write_ln_P(const char *data, bool invert) { void oled_write_raw_P(const char *data, uint16_t size) { if (size > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE; for (uint16_t i = 0; i < size; i++) { - uint8_t c = pgm_read_byte(++data); + uint8_t c = pgm_read_byte(data++); if (oled_buffer[i] == c) continue; oled_buffer[i] = c; oled_dirty |= (1 << (i / OLED_BLOCK_SIZE)); -- cgit v1.2.3