mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 05:05:19 -05:00
fix: Hex editor insert mode inserting or removing too many bytes
This commit is contained in:
@@ -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]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user