mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-23 17:05:36 +01:00
fix return find_free_cell
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user