fix: Hex editor displaying ?? for every byte after editing
This commit is contained in:
parent
b580691871
commit
440ba3823e
@ -64,6 +64,8 @@ namespace hex::plugin::builtin::prv {
|
||||
return "hex.builtin.provider.file";
|
||||
}
|
||||
|
||||
std::pair<Region, bool> getRegionValidity(u64 address) const override;
|
||||
|
||||
protected:
|
||||
#if defined(OS_WINDOWS)
|
||||
|
||||
|
@ -335,4 +335,11 @@ namespace hex::plugin::builtin::prv {
|
||||
return Provider::storeSettings(settings);
|
||||
}
|
||||
|
||||
std::pair<Region, bool> FileProvider::getRegionValidity(u64 address) const {
|
||||
if (address < this->getActualSize())
|
||||
return { Region { address, this->getActualSize() - address }, true };
|
||||
else
|
||||
return { Region::Invalid(), false };
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user