Assertion triggered
Riztazz opened this issue · 0 comments
Riztazz commented
Hi,
I've been tinkering a bit with your library in past few days and when trying to limit the history size i keep running into assertion crash at line:
https://github.com/dacap/undo/blob/main/undo_history.cpp#L133
I've basically added this at the end of https://github.com/dacap/undo/blob/main/undo_history.cpp#L157:
if ( ++m_addedCommands > 10 )
{
deleteFirstState();
--m_addedCommands;
}
and then execute a bunch of commands, go backwards, execute commands, go forward, execute commands - after a few front pops it will assert and crash