diff --git a/page.go b/page.go index b5c1699..415cd77 100644 --- a/page.go +++ b/page.go @@ -56,7 +56,7 @@ func (p *page) meta() *meta { // leafPageElement retrieves the leaf node by index func (p *page) leafPageElement(index uint16) *leafPageElement { - off := uintptr(index) * unsafe.Sizeof(leafPageElement{}) + off := uintptr(index) * leafPageElementSize return (*leafPageElement)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + unsafe.Sizeof(*p) + off)) }