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

Max capacity is max+1? #4

Open
trapexit opened this issue Jul 26, 2020 · 2 comments
Open

Max capacity is max+1? #4

trapexit opened this issue Jul 26, 2020 · 2 comments

Comments

@trapexit
Copy link

If I create a queue of max size I'm able to insert more than that. At least one. When emptying the queue it seems to have overwritten the first value.

@Taymindis
Copy link
Owner

hi @trapexit ,

would you mind to show me your example code.

@trapexit
Copy link
Author

I need to confirm in my main usage but after attempting to create an example I realized that if the enqueued pointer is NULL then it will increment the size and ignores the capacity. I understand why NULL isn't valid but didn't dawn on me till now. Though I shouldn't be trying to enqueue a NULL in where I saw the issue so maybe I have a bug.

Perhaps just need some more thorough documentation to point this out.

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

2 participants