fix(nimble): fix NVS corruption

This commit is contained in:
Astha Verma
2025-02-11 11:26:13 +05:30
parent 81b1700f64
commit a594c0d26e
+1 -1
View File
@@ -509,7 +509,7 @@ populate_db_from_nvs(int obj_type, void *dst, int *db_num)
db_item += sizeof(struct ble_store_value_csfc);
(*db_num)++;
#if MYNEWT_VAL(ENC_ADV_DATA)
} if (obj_type == BLE_STORE_OBJ_TYPE_ENC_ADV_DATA) {
} else if (obj_type == BLE_STORE_OBJ_TYPE_ENC_ADV_DATA) {
ESP_LOGD(TAG, "EAD in RAM is filled up from NVS index = %d", i);
memcpy(db_item, &cur.ead, sizeof(struct ble_store_value_ead));
db_item += sizeof(struct ble_store_value_ead);