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

Repeated PushFront -> PopBack causes index out of range [-1] #20

Closed
ghost opened this issue Apr 27, 2020 · 1 comment
Closed

Repeated PushFront -> PopBack causes index out of range [-1] #20

ghost opened this issue Apr 27, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 27, 2020

This panics on the 65th iteration:

package main

import "github.com/ef-ds/deque"

func main() {
	q := deque.New()
	for {
		q.PushFront(1)
		q.PopBack()
	}
}

https://play.golang.org/p/CaG4fu1EY-E

I know that isn't the normal use, but I feel like it should work.

@christianrpetrin
Copy link
Collaborator

Many thanks @jrodatus for reporting the issue!

This issue was closed.
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