1
0
mirror of https://github.com/esphome/esphome.git synced 2025-01-18 12:05:41 +00:00

Fixed libretiny preference wrongly detecting change in the data to store (#7990)

This commit is contained in:
Piotr Szulc 2025-01-13 05:31:01 +01:00 committed by GitHub
parent 9874d17613
commit 30bb806f26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -147,7 +147,7 @@ class LibreTinyPreferences : public ESPPreferences {
ESP_LOGV(TAG, "fdb_kv_get_obj('%s'): nullptr - the key might not be set yet", to_save.key.c_str());
return true;
}
stored_data.data.reserve(kv.value_len);
stored_data.data.resize(kv.value_len);
fdb_blob_make(&blob, stored_data.data.data(), kv.value_len);
size_t actual_len = fdb_kv_get_blob(db, to_save.key.c_str(), &blob);
if (actual_len != kv.value_len) {