ux: Fix hex editor selection sometimes setting end to max address
This commit is contained in:
parent
5551e82fea
commit
aed9d15625
@ -32,7 +32,15 @@ namespace hex::plugin::builtin {
|
||||
public:
|
||||
void setSelection(const Region ®ion) { this->setSelection(region.getStartAddress(), region.getEndAddress()); }
|
||||
void setSelection(i128 start, i128 end) {
|
||||
if (!ImHexApi::Provider::isValid()) return;
|
||||
if (!ImHexApi::Provider::isValid())
|
||||
return;
|
||||
if (start == InvalidSelection && end == InvalidSelection)
|
||||
return;
|
||||
|
||||
if (start == InvalidSelection)
|
||||
start = end;
|
||||
if (end == InvalidSelection)
|
||||
end = start;
|
||||
|
||||
const size_t maxAddress = ImHexApi::Provider::get()->getActualSize() - 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user