Skip to content

Commit

Permalink
Only increment counter for empty streams
Browse files Browse the repository at this point in the history
Avoids slice panic when block contains mix of non-empty and empty
files, with the empty files not at the beginning of the block.

Fixes #87
  • Loading branch information
bodgit committed May 27, 2023
1 parent 7f14c77 commit ef8fd8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,8 @@ func readFilesInfo(r util.Reader) (*filesInfo, error) {
for i := range f.file {
if f.file[i].isEmptyStream {
f.file[i].isEmptyFile = empty[j]
j++
}
j++
}
case idCTime:
times, err := readTimes(r, files)
Expand Down

0 comments on commit ef8fd8a

Please sign in to comment.