Merge branch 'bugfix/IDFGH-2910_v4.0' into 'release/v4.0'

NVS: bugfix - iterator skipping version 1 blobs (v4.0)

See merge request espressif/esp-idf!8193
This commit is contained in:
Ivan Grokhotkov
2020-04-09 05:45:21 +08:00
4 changed files with 65 additions and 1 deletions

View File

@@ -763,7 +763,9 @@ inline bool isIterableItem(Item& item)
inline bool isMultipageBlob(Item& item)
{
return (item.datatype == ItemType::BLOB_DATA && item.chunkIndex != 0);
return (item.datatype == ItemType::BLOB_DATA &&
!(item.chunkIndex == static_cast<uint8_t>(VerOffset::VER_0_OFFSET)
|| item.chunkIndex == static_cast<uint8_t>(VerOffset::VER_1_OFFSET)));
}
bool Storage::nextEntry(nvs_opaque_iterator_t* it)