Bugfixes for stack size and market cap with small chars, write tests for the small char mcap

This commit is contained in:
Djuri 2024-09-28 00:03:18 +02:00
parent e8a9e253f7
commit 85579e98cf
7 changed files with 162 additions and 15 deletions

View file

@ -300,7 +300,8 @@ JsonDocument getLedStatusObject()
uint green = (pixColor >> 8) & 0xFF;
uint blue = pixColor & 0xFF;
char hexColor[8];
sprintf(hexColor, "#%02X%02X%02X", red, green, blue);
snprintf(hexColor, sizeof(hexColor), "#%02X%02X%02X", red, green, blue);
JsonObject object = colors.add<JsonObject>();
object["red"] = red;