From dc0e6f4f919ee781443fddbd9792f1d405c4bbae Mon Sep 17 00:00:00 2001 From: Henry Gabryjelski Date: Wed, 15 Jan 2025 09:18:39 -0800 Subject: [PATCH] Fix regression Found by iceman1001's code review ... THANK YOU! --- armsrc/spiffs_check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/armsrc/spiffs_check.c b/armsrc/spiffs_check.c index c35bc3e1f1..636feb7694 100644 --- a/armsrc/spiffs_check.c +++ b/armsrc/spiffs_check.c @@ -586,7 +586,7 @@ static s32_t spiffs_page_consistency_check_i(spiffs *fs) { 0); // traverse each page except for lookup pages spiffs_page_ix cur_pix = SPIFFS_OBJ_LOOKUP_PAGES(fs) + SPIFFS_PAGES_PER_BLOCK(fs) * cur_block; - while (!restart && cur_pix < total_blocks_plus_one_page) { + while (!restart && cur_pix < SPIFFS_PAGES_PER_BLOCK(fs) * (cur_block+1)) { //if ((cur_pix & 0xff) == 0) // SPIFFS_CHECK_DBG("PA: processing pix "_SPIPRIpg", block "_SPIPRIbl" of pix "_SPIPRIpg", block "_SPIPRIbl"\n", // cur_pix, cur_block, total_blocks, block_count);