diff --git a/pkg/kv/bolt/bolt.go b/pkg/kv/bolt/bolt.go index 3db6042..70025be 100644 --- a/pkg/kv/bolt/bolt.go +++ b/pkg/kv/bolt/bolt.go @@ -1,6 +1,7 @@ package bolt import ( + "bytes" "fmt" "io/fs" "iter" @@ -119,7 +120,7 @@ func (b *Bucket) Range(opts ...containers.Option[kv.RangeOptions]) iter.Seq2[[]b if options.Start != nil { // Seek moves the cursor to a given key using a b-tree search and returns it. If the key does not exist then the next key is used. If no keys follow, a nil key is returned - if k, v = cursor.Seek(options.Start); options.Order == kv.Descending && bytes.Compare(k, options.start) > 0 { + if k, v = cursor.Seek(options.Start); options.Order == kv.Descending && bytes.Compare(k, options.Start) > 0 { k, v = cursor.Prev() } } else {