diff options
Diffstat (limited to 'cursor.go')
-rw-r--r-- | cursor.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -235,7 +235,7 @@ func (c *Cursor) nsearch(key []byte) { // keyValue returns the key and value of the current leaf element. func (c *Cursor) keyValue() ([]byte, []byte) { ref := &c.stack[len(c.stack)-1] - if ref.index >= ref.count() { + if ref.count() == 0 || ref.index >= ref.count() { return nil, nil } |