1
0
mirror of synced 2024-11-12 10:10:53 +01:00

fix: Provider reader being broken

This commit is contained in:
WerWolv 2023-04-20 13:46:44 +02:00
parent e1b12546da
commit 1e39f4354f
2 changed files with 6 additions and 3 deletions

View File

@ -20,7 +20,10 @@ namespace hex::prv {
public:
using BufferedReader::BufferedReader;
ProviderReader(Provider *provider, size_t bufferSize = 0x100000) : BufferedReader(provider, provider->getActualSize(), bufferSize) { }
ProviderReader(Provider *provider, size_t bufferSize = 0x100000) : BufferedReader(provider, provider->getActualSize(), bufferSize) {
this->setEndAddress(provider->getBaseAddress() + provider->getActualSize() - 1);
this->seek(provider->getBaseAddress());
}
};
}

View File

@ -168,8 +168,8 @@ namespace hex::plugin::builtin {
}
if (providerA->getActualSize() != providerB->getActualSize()) {
auto endA = providerA->getActualSize() - 1;
auto endB = providerB->getActualSize() - 1;
auto endA = providerA->getActualSize() + 1;
auto endB = providerB->getActualSize() + 1;
if (endA > endB)
differences.push_back(Diff { Region{ endB, endA - endB }, ViewDiff::DifferenceType::Added });