mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
Issue 2196 disassembler upper bound (#2272)
Issue #2196: Disassembler region range upper bound not inclusive ### Problem description The issue is described [here](https://github.com/WerWolv/ImHex/issues/2196) ### Implementation description Some off by 1s Co-authored-by: paxcut <53811119+paxcut@users.noreply.github.com>
This commit is contained in:
@@ -68,9 +68,9 @@ namespace hex::plugin::disasm {
|
||||
u64 instructionDataAddress = region.getStartAddress();
|
||||
|
||||
bool hadError = false;
|
||||
while (instructionDataAddress < region.getEndAddress()) {
|
||||
while (instructionDataAddress <= region.getEndAddress()) {
|
||||
// Read a chunk of data
|
||||
size_t bufferSize = std::min<u64>(buffer.size(), (region.getEndAddress() - instructionDataAddress));
|
||||
size_t bufferSize = std::min<u64>(buffer.size(), (region.getEndAddress()-instructionDataAddress)+1);
|
||||
provider->read(instructionDataAddress, buffer.data(), bufferSize);
|
||||
|
||||
auto code = std::span(buffer.data(), bufferSize);
|
||||
|
||||
Reference in New Issue
Block a user