Skip to content

Commit 72388e2

Browse files
authored
Fix: do not crash on ASCII chars with a numeric value exceeding 127. (#41)
1 parent 9a2638e commit 72388e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ArduinoGraphics.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ void ArduinoGraphics::text(const char* str, int x, int y)
238238
}
239239

240240
while (*str) {
241-
int c = *str++;
241+
uint8_t const c = (uint8_t)*str++;
242242

243243
if (c == '\n') {
244244
y += _font->height;

0 commit comments

Comments
 (0)