diff --git a/plugins/builtin/include/content/providers/file_provider.hpp b/plugins/builtin/include/content/providers/file_provider.hpp index 322c99c30..1ead71012 100644 --- a/plugins/builtin/include/content/providers/file_provider.hpp +++ b/plugins/builtin/include/content/providers/file_provider.hpp @@ -64,6 +64,8 @@ namespace hex::plugin::builtin::prv { return "hex.builtin.provider.file"; } + std::pair getRegionValidity(u64 address) const override; + protected: #if defined(OS_WINDOWS) diff --git a/plugins/builtin/source/content/providers/file_provider.cpp b/plugins/builtin/source/content/providers/file_provider.cpp index 90ef798c0..1b4cb088c 100644 --- a/plugins/builtin/source/content/providers/file_provider.cpp +++ b/plugins/builtin/source/content/providers/file_provider.cpp @@ -335,4 +335,11 @@ namespace hex::plugin::builtin::prv { return Provider::storeSettings(settings); } + std::pair FileProvider::getRegionValidity(u64 address) const { + if (address < this->getActualSize()) + return { Region { address, this->getActualSize() - address }, true }; + else + return { Region::Invalid(), false }; + } + }