mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
fix: Selecting byte ranges that don't exist causing a crash
This commit is contained in:
@@ -45,6 +45,9 @@ namespace hex::plugin::builtin::ui {
|
||||
if (!ImHexApi::Provider::isValid())
|
||||
return;
|
||||
|
||||
if (start > this->m_provider->getBaseAddress() + this->m_provider->getActualSize())
|
||||
return;
|
||||
|
||||
const size_t maxAddress = this->m_provider->getActualSize() + this->m_provider->getBaseAddress() - 1;
|
||||
|
||||
constexpr static auto alignDown = [](u128 value, u128 alignment) {
|
||||
|
||||
Reference in New Issue
Block a user