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

bugfix for lifo queue nil pointer #69

Merged

Conversation

marcoferrer
Copy link
Contributor

@marcoferrer marcoferrer commented Oct 29, 2021

@platinummonkey

I've run into two issues with when testing out the lifo queue implementation.

  • If you try to remove the last element in the queue line 114 would produce a nil pointer.
  • If you try to remove the first element in the queue line 109 would cause duplicate element ids to occur. Looking at the implementation for pop, youll see the element id is never decremented.

Tests covering the changes have been added

Copy link
Owner

@platinummonkey platinummonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 thanks for this bugfix! 🥇

@platinummonkey platinummonkey merged commit 5b2ca18 into platinummonkey:master Oct 31, 2021
@platinummonkey
Copy link
Owner

@platinummonkey platinummonkey added the bug Something isn't working label Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants