From a6f5bcbaf4ac53e6f3c2790c1c1cf5d1f5fc9c35 Mon Sep 17 00:00:00 2001 From: Pere Diaz Bou Date: Sun, 16 Feb 2025 19:21:37 +0100 Subject: [PATCH] fix return find_free_cell --- core/storage/btree.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/storage/btree.rs b/core/storage/btree.rs index e2b286d4c..5d9a488c0 100644 --- a/core/storage/btree.rs +++ b/core/storage/btree.rs @@ -2098,16 +2098,16 @@ fn find_free_cell(page_ref: &PageContent, usable_space: u16, amount: usize) -> R page_ref.write_u8(PAGE_HEADER_OFFSET_FRAGMENTED_BYTES_COUNT, frag); } pc += new_size as usize; - return Ok(pc); } + return Ok(pc); } prev_pc = pc; + pc = next as usize; if pc <= prev_pc && pc != 0 { return Err(LimboError::Corrupt( "Free list not in ascending order".into(), )); } - pc = next as usize; } if pc > maxpc + amount - 4 { return Err(LimboError::Corrupt(