summaryrefslogtreecommitdiff
path: root/system/db/content.go
diff options
context:
space:
mode:
Diffstat (limited to 'system/db/content.go')
-rw-r--r--system/db/content.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/db/content.go b/system/db/content.go
index 3e22a68..a3a4da1 100644
--- a/system/db/content.go
+++ b/system/db/content.go
@@ -240,7 +240,7 @@ func Query(namespace string, opts QueryOptions) [][]byte {
cur := 0 // count of where cursor is
switch opts.Order {
case "asc":
- for k, v := c.Last(); k != nil; c.Prev() {
+ for k, v := c.Last(); k != nil; k, v = c.Prev() {
if cur < end {
cur++
continue
@@ -260,7 +260,7 @@ func Query(namespace string, opts QueryOptions) [][]byte {
}
case "desc":
- for k, v := c.First(); k != nil; c.Next() {
+ for k, v := c.First(); k != nil; k, v = c.Next() {
if cur < start {
cur++
continue