1
0
mirror of synced 2025-01-18 00:56:49 +01:00

fix: Goto and Select being able to select bytes in zero-size files

This commit is contained in:
WerWolv 2023-11-12 00:20:30 +01:00
parent 9fb60a8ab0
commit 3d04669ef0

View File

@ -51,6 +51,9 @@ namespace hex::plugin::builtin::ui {
if (start < this->m_provider->getBaseAddress()) if (start < this->m_provider->getBaseAddress())
return; return;
if (this->m_provider->getActualSize() == 0)
return;
const size_t maxAddress = this->m_provider->getActualSize() + this->m_provider->getBaseAddress() - 1; const size_t maxAddress = this->m_provider->getActualSize() + this->m_provider->getBaseAddress() - 1;
constexpr static auto alignDown = [](u128 value, u128 alignment) { constexpr static auto alignDown = [](u128 value, u128 alignment) {