1
0
mirror of synced 2024-11-12 02:00:52 +01:00

fix: Selecting byte ranges that don't exist causing a crash

This commit is contained in:
WerWolv 2023-11-11 23:00:37 +01:00
parent 26f873a364
commit 7f35d81722

View File

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