mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:17:35 +00:00
AK: Fix overflow and mixed-signedness issues in binary_search() (#2961)
This commit is contained in:
parent
2242f69cd6
commit
615ba0f368
4 changed files with 57 additions and 8 deletions
|
@ -172,7 +172,7 @@ void RangeAllocator::deallocate(Range range)
|
|||
|
||||
ASSERT(!m_available_ranges.is_empty());
|
||||
|
||||
int nearby_index = 0;
|
||||
size_t nearby_index = 0;
|
||||
auto* existing_range = binary_search(
|
||||
m_available_ranges.span(), range, [](auto& a, auto& b) {
|
||||
return a.base().get() - b.end().get();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue