1
0
mirror of synced 2024-11-28 09:30:51 +01:00

fix: Exporting selection doesn't export last byte

This commit is contained in:
WerWolv 2024-04-23 21:02:13 +02:00
parent fd61e757f0
commit 79e1df1af2

View File

@ -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());