diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-16 15:43:35 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-16 15:43:35 -0700 |
commit | 459b8eb4ab16516974ff616196e4a2593ecbb7b7 (patch) | |
tree | 67cb8ddbbde55b26db5fb3a7463cd181e41be465 /node.go | |
parent | Merge pull request #36 from benbjohnson/for-each (diff) | |
download | dedo-459b8eb4ab16516974ff616196e4a2593ecbb7b7.tar.gz dedo-459b8eb4ab16516974ff616196e4a2593ecbb7b7.tar.xz |
Read-only transactional block.
Diffstat (limited to 'node.go')
-rw-r--r-- | node.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -118,7 +118,7 @@ func (n *node) del(key []byte) { index := sort.Search(len(n.inodes), func(i int) bool { return bytes.Compare(n.inodes[i].key, key) != -1 }) // Exit if the key isn't found. - if !bytes.Equal(n.inodes[index].key, key) { + if index >= len(n.inodes) || !bytes.Equal(n.inodes[index].key, key) { return } |