fix: BufferedReader messing up the second to last byte

This commit is contained in:
WerWolv
2022-09-16 08:30:28 +02:00
parent 44a90f5c7d
commit bf00503d1f
2 changed files with 6 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ namespace hex::plugin::builtin {
auto reader = prv::BufferedReader(provider);
reader.seek(offset);
reader.setEndAddress(offset + size);
reader.setEndAddress(offset + size - 1);
u64 index = 0x00;
for (u8 byte : reader) {
@@ -160,7 +160,7 @@ namespace hex::plugin::builtin {
auto reader = prv::BufferedReader(provider);
reader.seek(offset);
reader.setEndAddress(offset + size);
reader.setEndAddress((offset + size) - 1);
u64 address = offset & ~u64(0x0F);
std::string asciiRow;