fix: MemoryProvider not having any valid regions
This commit is contained in:
parent
a0fddd2953
commit
4e0a93fc20
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user