Skip to content

Commit

Permalink
Merge pull request #88 from bodgit/issue87
Browse files Browse the repository at this point in the history
Fix panic with empty files
  • Loading branch information
bodgit authored May 27, 2023
2 parents 4b71012 + ef8fd8a commit 91a7926
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ func TestOpenReader(t *testing.T) {
name: "sparc",
file: "sparc.7z",
},
{
name: "issue 87",
file: "issue87.7z",
},
}

for _, table := range tables {
Expand Down
Binary file added testdata/issue87.7z
Binary file not shown.
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 91a7926

Please sign in to comment.