Skip to content

Assertion triggered #1

Description

@Riztazz

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions