From 96b53875b547b237e87e6e02d073bebbac4172da Mon Sep 17 00:00:00 2001 From: Scott Allen Date: Thu, 13 Apr 2017 21:48:49 -0400 Subject: [PATCH] Eliminate mismatched type warning in drawChar() Also changed a loop index from int8_t to uint8_t to match other loops. --- src/Arduboy2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Arduboy2.cpp b/src/Arduboy2.cpp index b2cbf8a..506823b 100644 --- a/src/Arduboy2.cpp +++ b/src/Arduboy2.cpp @@ -1161,7 +1161,7 @@ void Arduboy2::drawChar { uint8_t line; bool draw_background = bg != color; - uint8_t *bitmap = font + c*5; + const unsigned char* bitmap = font + c * 5; if ((x >= WIDTH) || // Clip right (y >= HEIGHT) || // Clip bottom @@ -1172,14 +1172,14 @@ void Arduboy2::drawChar return; } - for (uint8_t i=0; i<6; i++ ) + for (uint8_t i = 0; i < 6; i++ ) { line = pgm_read_byte(bitmap++); if (i == 5) { line = 0x0; } - for (int8_t j = 0; j<8; j++) + for (uint8_t j = 0; j < 8; j++) { uint8_t draw_color = (line & 0x1) ? color : bg;