Fix tests.

This commit is contained in:
Skyth
2024-09-22 19:58:22 +03:00
parent 510cff56f2
commit 1914b941a2
6 changed files with 271 additions and 281 deletions

View File

@@ -11,12 +11,7 @@ void Image::Map(const std::string_view& name, size_t base, uint32_t size, uint8_
const void* Image::Find(size_t address) const
{
const auto section = sections.lower_bound(address);
if (section == sections.end())
{
return nullptr;
}
const auto section = std::prev(sections.upper_bound(address));
return section->data + (address - section->base);
}