1
0
mirror of synced 2025-01-29 19:17:28 +01:00

fix: MemoryProvider not having any valid regions

This commit is contained in:
WerWolv 2023-12-27 01:05:34 +01:00
parent a0fddd2953
commit 4e0a93fc20

View File

@ -36,6 +36,14 @@ namespace hex::prv {
[[nodiscard]] std::string getTypeName() const override { return "MemoryProvider"; }
std::pair<Region, bool> getRegionValidity(u64 address) const {
address -= this->getBaseAddress();
if (address < this->getActualSize())
return { Region { this->getBaseAddress() + address, this->getActualSize() - address }, true };
else
return { Region::Invalid(), false };
}
private:
void renameFile();