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:
parent
9874d17613
commit
30bb806f26
@ -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());
|
ESP_LOGV(TAG, "fdb_kv_get_obj('%s'): nullptr - the key might not be set yet", to_save.key.c_str());
|
||||||
return true;
|
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);
|
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);
|
size_t actual_len = fdb_kv_get_blob(db, to_save.key.c_str(), &blob);
|
||||||
if (actual_len != kv.value_len) {
|
if (actual_len != kv.value_len) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user