e314f42b0c
When read caching was added, Page::findItem started modifying itemIndex reference argument even if item wasn't found. Incidentally, Storage::findItem reused itemIndex when starting search at next page. So, - if the first page had a cached index (findItem was called for that page), and it pointed to a non-zero index, - first page has a few empty items at the end (but is marked full), - next search looked up the item on the second page, - index of the item on the second page was less than the cached index on the first page, then the search would fail because cached starting index was reused. This change fixes both sides of the problem: - Page::findItem shouldn't modify itemIndex argument if item is not found - Storage::findItem should not reuse itemIndex between pages Two tests have been added. |
||
---|---|---|
.. | ||
catch.hpp | ||
crc.cpp | ||
crc.h | ||
main.cpp | ||
Makefile | ||
sdkconfig.h | ||
spi_flash_emulation.cpp | ||
spi_flash_emulation.h | ||
test_compressed_enum_table.cpp | ||
test_intrusive_list.cpp | ||
test_nvs.cpp | ||
test_spi_flash_emulation.cpp |