aboutsummaryrefslogtreecommitdiff
path: root/bnode.go
diff options
context:
space:
mode:
Diffstat (limited to 'bnode.go')
-rw-r--r--bnode.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/bnode.go b/bnode.go
index 9fef154..3ad4f58 100644
--- a/bnode.go
+++ b/bnode.go
@@ -15,5 +15,6 @@ type bnode struct {
// key returns a byte slice of the node key.
func (n *bnode) key() []byte {
- return (*[MaxKeySize]byte)(unsafe.Pointer(&n))[n.pos : n.pos+n.ksize]
+ buf := (*[maxAllocSize]byte)(unsafe.Pointer(n))
+ return buf[n.pos : n.pos+n.ksize]
}