fix: Hex editor insert mode inserting or removing too many bytes

This commit is contained in:
WerWolv
2025-07-24 19:28:46 +02:00
parent 601b13cf42
commit 0e720a1e02
2 changed files with 31 additions and 15 deletions

View File

@@ -80,6 +80,10 @@ namespace hex::prv::undo {
for (u32 i = 0; i < count; i += 1) {
i64 index = startIndex + i;
if (index < 0 || u64(index) >= m_undoStack.size()) {
break;
}
m_undoStack[index]->undo(m_provider);
operation->addOperation(std::move(m_undoStack[index]));
}