diff --git a/queue.go b/queue.go index 6fe6ca8..6b79323 100644 --- a/queue.go +++ b/queue.go @@ -71,7 +71,7 @@ func (q *Queue) Get(i int) interface{} { // If indexing backwards, convert to positive index. if i < 0 { - i = q.count + i + i += q.count } if i < 0 || i >= q.count { panic("queue: Get() called with index out of range")