fix: Exporting selection doesn't export last byte
This commit is contained in:
parent
fd61e757f0
commit
79e1df1af2
@ -198,7 +198,7 @@ namespace hex::plugin::builtin {
|
||||
std::vector<u8> bytes(5_MiB);
|
||||
|
||||
auto selection = ImHexApi::HexEditor::getSelection();
|
||||
for (u64 address = selection->getStartAddress(); address < selection->getEndAddress(); address += bytes.size()) {
|
||||
for (u64 address = selection->getStartAddress(); address <= selection->getEndAddress(); address += bytes.size()) {
|
||||
bytes.resize(std::min<u64>(bytes.size(), selection->getEndAddress() - address));
|
||||
provider->read(address, bytes.data(), bytes.size());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user