aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBrian Mock <brian@mockbrian.com>2020-05-09 20:14:07 -0700
committerGitHub <noreply@github.com>2020-05-10 04:14:07 +0100
commit8ca4ed9a987f9e7815a813592a0210c4853386e6 (patch)
tree75a92b47633f4406734e0aa4b20d1bb1e40a5369 /drivers
parent640d12d07072139ad3e7dea7c59e86b9b01a6fd6 (diff)
downloadqmk_firmware-8ca4ed9a987f9e7815a813592a0210c4853386e6.tar.gz
qmk_firmware-8ca4ed9a987f9e7815a813592a0210c4853386e6.zip
Fix off by one error with oled_write_raw_P (#9045)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/oled/oled_driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c
index ce5c23cc4..eedaedcd3 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) {
479void oled_write_raw_P(const char *data, uint16_t size) { 479void oled_write_raw_P(const char *data, uint16_t size) {
480 if (size > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE; 480 if (size > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE;
481 for (uint16_t i = 0; i < size; i++) { 481 for (uint16_t i = 0; i < size; i++) {
482 uint8_t c = pgm_read_byte(++data); 482 uint8_t c = pgm_read_byte(data++);
483 if (oled_buffer[i] == c) continue; 483 if (oled_buffer[i] == c) continue;
484 oled_buffer[i] = c; 484 oled_buffer[i] = c;
485 oled_dirty |= (1 << (i / OLED_BLOCK_SIZE)); 485 oled_dirty |= (1 << (i / OLED_BLOCK_SIZE));