fix: Off-by-one when calculating hashes of selected regions
Fixes #2046
This commit is contained in:
parent
dcd80fe6ad
commit
1c30533d19
@ -23,7 +23,7 @@ namespace hex::plugin::hashes {
|
|||||||
reader.seek(region.getStartAddress());
|
reader.seek(region.getStartAddress());
|
||||||
reader.setEndAddress(region.getEndAddress());
|
reader.setEndAddress(region.getEndAddress());
|
||||||
|
|
||||||
for (u64 address = region.getStartAddress(); address < region.getEndAddress(); address += 1_MiB) {
|
for (u64 address = region.getStartAddress(); address <= region.getEndAddress(); address += 1_MiB) {
|
||||||
u64 readSize = std::min<u64>(1_MiB, (region.getEndAddress() - address) + 1);
|
u64 readSize = std::min<u64>(1_MiB, (region.getEndAddress() - address) + 1);
|
||||||
|
|
||||||
auto data = reader.read(address, readSize);
|
auto data = reader.read(address, readSize);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user