nvram: fix initialization bug.

This commit is contained in:
Maxim Poliakovski 2022-10-31 00:57:55 +01:00
parent b480903c7a
commit c28fd138c2

View File

@ -76,7 +76,7 @@ void NVram::init() {
memcmp(sig, NVRAM_FILE_ID, sizeof(NVRAM_FILE_ID)) || data_size != this->ram_size ||
!f.read((char*)this->storage, this->ram_size)) {
LOG_F(WARNING, "Could not restore NVRAM content from the given file.");
memset(this->storage, 0, sizeof(this->ram_size));
memset(this->storage, 0, this->ram_size);
}
f.close();