oappendi: fix stack corruption due to large numbers (ESP32 only)

This commit is contained in:
Frank
2023-03-27 13:19:35 +02:00
parent 5611a54a1a
commit d74f41d680

View File

@@ -139,8 +139,8 @@ void sappends(char stype, const char* key, char* val)
bool oappendi(int i) bool oappendi(int i)
{ {
char s[11]; char s[16]; // WLEDMM max 32bit integer needs 11 chars (sign + 10) not 10
sprintf(s, "%d", i); snprintf(s, 15, "%d", i); // WLEDMM
return oappend(s); return oappend(s);
} }