Skip to content

Commit

Permalink
Check if digest has element j
Browse files Browse the repository at this point in the history
  • Loading branch information
bill-rich committed Dec 5, 2023
1 parent be2576c commit 57dc488
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion types.go
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,9 @@ func readHeader(r util.Reader) (*header, error) {
continue
}

h.filesInfo.file[i].CRC32 = h.streamsInfo.subStreamsInfo.digest[j]
if len(h.streamsInfo.subStreamsInfo.digest) > j {
h.filesInfo.file[i].CRC32 = h.streamsInfo.subStreamsInfo.digest[j]
}
_, h.filesInfo.file[i].UncompressedSize = h.streamsInfo.FileFolderAndSize(j)
j++
}
Expand Down

0 comments on commit 57dc488

Please sign in to comment.