oappendi: fix stack corruption due to large numbers (ESP32 only)
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user