From ef8fd8ac145522abdd2d6e91e821ade02213831e Mon Sep 17 00:00:00 2001 From: Matt Dainty Date: Sat, 27 May 2023 23:06:08 +0100 Subject: [PATCH] Only increment counter for empty streams 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 --- types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types.go b/types.go index d03a351..12e0df8 100644 --- a/types.go +++ b/types.go @@ -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)