mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: MemoryProvider not having any valid regions
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user