You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.
File configFile = LittleFS.open("/awtrix.json", "r");
if (configFile)
{
size_t size = configFile.size();
// Allocate a buffer to store contents of the file.
std::unique_ptr<char[]> buf(new char[size]);
configFile.readBytes(buf.get(), size);
DynamicJsonBuffer jsonBuffer;
JsonObject &json = jsonBuffer.parseObject(buf.get());
if (json.success())
If /awtrix.json is newly add, its size will be zero.Then buf will be buf(new char[0]).
In fuction jsonBuffer.parseObject(buf.get());, it will read address 0x0, causes Exception (28) crash
The text was updated successfully, but these errors were encountered:
In setup() function
If /awtrix.json is newly add, its size will be zero.Then buf will be buf(new char[0]).
In fuction jsonBuffer.parseObject(buf.get());, it will read address 0x0, causes Exception (28) crash
The text was updated successfully, but these errors were encountered: