diff --git a/structure/list.go b/structure/list.go index d158969b..01ebd2e0 100644 --- a/structure/list.go +++ b/structure/list.go @@ -212,7 +212,7 @@ func (l *ListStructure) RPop(key string) (interface{}, error) { // Find the new tail newTail := lst.Head - for i := 0; i < lst.Length-1; i++ { + for i := 0; i < lst.Length-2; i++ { newTail = newTail.Next } popValue := newTail.Next.Value