Skip to content

Commit 30b9fb2

Browse files
authored
Merge pull request #39 from bachue/fix/crash
fix a possible `index out of range` crash
2 parents 475ed65 + 3771b58 commit 30b9fb2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

data/builder/file.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ func fileTreeRecursive(depth int, children []ipld.Link, childLen []uint64, src c
109109
}
110110
totalSize += sz
111111
children = append(children, nxt)
112+
childLen = append(childLen, sz)
112113
blksizes = append(blksizes, sz)
113114
}
114115
if len(children) == 0 {

0 commit comments

Comments
 (0)