1
0
mirror of synced 2024-11-14 11:07:43 +01:00

fix: Hex editor displaying ?? for every byte after editing

This commit is contained in:
WerWolv 2022-08-14 09:38:38 +02:00
parent b580691871
commit 440ba3823e
2 changed files with 9 additions and 0 deletions

View File

@ -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)

View File

@ -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 };
}
}