fix: Undo points not being created correctly

This commit is contained in:
WerWolv 2022-02-15 21:50:02 +01:00
parent f5440ee52c
commit 227040f82f
2 changed files with 3 additions and 3 deletions

View File

@ -694,7 +694,7 @@ struct MemoryEditor
if (data_next && DataEditingAddr < mem_size) if (data_next && DataEditingAddr < mem_size)
{ {
DataEditingAddr = DataPreviewAddr = DataEditingAddr + 1; DataEditingAddr = DataPreviewAddr = DataPreviewAddrEnd = DataEditingAddr + 1;
DataEditingTakeFocus = true; DataEditingTakeFocus = true;
} }
else if (data_editing_addr_next != (size_t)-1) else if (data_editing_addr_next != (size_t)-1)

View File

@ -62,7 +62,7 @@ namespace hex::plugin::builtin::prv {
if ((offset - this->getBaseAddress()) > (this->getActualSize() - size) || buffer == nullptr || size == 0) if ((offset - this->getBaseAddress()) > (this->getActualSize() - size) || buffer == nullptr || size == 0)
return; return;
addPatch(offset, buffer, size); addPatch(offset, buffer, size, true);
} }
void FileProvider::readRaw(u64 offset, void *buffer, size_t size) { void FileProvider::readRaw(u64 offset, void *buffer, size_t size) {
@ -238,7 +238,7 @@ namespace hex::plugin::builtin::prv {
#else #else
const auto &path = this->m_path.native(); const auto &path = this->m_path.native();
int mmapprot = PROT_READ | PROT_WRITE; int mmapprot = PROT_READ | PROT_WRITE;
this->m_file = ::open(path.c_str(), O_RDWR); this->m_file = ::open(path.c_str(), O_RDWR);
if (this->m_file == -1) { if (this->m_file == -1) {