mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 21:47:40 -05:00
fix: Multiple file provider resize issues
This commit is contained in:
@@ -62,6 +62,11 @@ namespace hex::prv {
|
||||
file.writeBuffer(buffer.data(), bufferSize);
|
||||
}
|
||||
|
||||
for (auto &[patchAddress, patch] : getPatches()) {
|
||||
file.seek(patchAddress - this->getBaseAddress());
|
||||
file.writeBuffer(&patch, 1);
|
||||
}
|
||||
|
||||
EventManager::post<EventProviderSaved>(this);
|
||||
}
|
||||
}
|
||||
@@ -130,13 +135,13 @@ namespace hex::prv {
|
||||
}
|
||||
|
||||
void Provider::applyPatches() {
|
||||
if (!this->isWritable())
|
||||
return;
|
||||
|
||||
for (auto &[patchAddress, patch] : getPatches()) {
|
||||
this->writeRaw(patchAddress - this->getBaseAddress(), &patch, 1);
|
||||
}
|
||||
|
||||
if (!this->isWritable())
|
||||
return;
|
||||
|
||||
this->markDirty();
|
||||
|
||||
this->m_patches.emplace_back();
|
||||
|
||||
Reference in New Issue
Block a user