From 6cafff924c5447d4bac0deaf43244efd83b8705f Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Thu, 22 Feb 2024 09:54:20 +0100 Subject: [PATCH] Fix: do not crash on ASCII chars with a numeric value exceeding 127. --- src/ArduinoGraphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ArduinoGraphics.cpp b/src/ArduinoGraphics.cpp index 3590eec..b47c2b5 100644 --- a/src/ArduinoGraphics.cpp +++ b/src/ArduinoGraphics.cpp @@ -238,7 +238,7 @@ void ArduinoGraphics::text(const char* str, int x, int y) } while (*str) { - int c = *str++; + uint8_t const c = (uint8_t)*str++; if (c == '\n') { y += _font->height;