mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-04 17:04:18 +01:00
the validation code was assuming that: - if the parent has overflow cells after a inserting divider cell - the exact divider we are validating MUST be in those overflow cells However, this is not necessarily the case. Imagine: - First divider gets inserted at index `n`. It is too large to fit, so it gets pushed to `parent.overflow_cells()`. Parent usable space does not decrease. - Second divider gets inserted at index `n+1`. It is smaller, so it still fits in usable space. Hence: Provide information to the validation function about whether the inserted cell overflowed, and use that to find the left pointer and assert accordingly.