Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion triggered #1

Open
Riztazz opened this issue Jan 28, 2023 · 0 comments
Open

Assertion triggered #1

Riztazz opened this issue Jan 28, 2023 · 0 comments

Comments

@Riztazz
Copy link

Riztazz commented Jan 28, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant