Fix preferences load bug
This commit is contained in:
parent
9e20e027b7
commit
a67e9f864a
|
@ -102,8 +102,10 @@ namespace preferences {
|
|||
|
||||
// Open the file and read it into a buffer
|
||||
if (!msc::open(PREFERENCES_PATH), false) return;
|
||||
msc::read(buffer, JSON_SIZE);
|
||||
size_t read = msc::read(buffer, JSON_SIZE);
|
||||
msc::close();
|
||||
|
||||
buffer[read] = '\0';
|
||||
|
||||
// Deserialize the JSON document
|
||||
DeserializationError error = deserializeJson(config_doc, buffer);
|
||||
|
|
Loading…
Reference in New Issue