fix: Selecting byte ranges that don't exist causing a crash
This commit is contained in:
parent
26f873a364
commit
7f35d81722
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user