fix all tests
This commit is contained in:
@@ -30,9 +30,10 @@ func loadNewNeedleMap(file *os.File) {
|
||||
}
|
||||
for count > 0 && e == nil {
|
||||
for i := 0; i < count; i += 16 {
|
||||
key := util.BytesToUint64(bytes[i: i+8])
|
||||
offset := util.BytesToUint32(bytes[i+8: i+12])
|
||||
size := util.BytesToUint32(bytes[i+12: i+16])
|
||||
key := BytesToNeedleId(bytes[i:i+NeedleIdSize])
|
||||
offset := BytesToOffset(bytes[i+NeedleIdSize:i+NeedleIdSize+OffsetSize])
|
||||
size := util.BytesToUint32(bytes[i+NeedleIdSize+OffsetSize:i+NeedleIdSize+OffsetSize+SizeSize])
|
||||
|
||||
if offset > 0 {
|
||||
m.Set(NeedleId(key), offset, size)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user