fix large files >4gig

This commit is contained in:
2023-08-22 17:20:56 +02:00
parent bc09b5aa60
commit f4796397ff
3 changed files with 26 additions and 13 deletions

View File

@@ -31,7 +31,7 @@ std::ostream& operator<<(std::ostream& out, const SHA1Digest& v) {
size_t FT1InfoSHA1::chunkSize(size_t chunk_index) const {
if (chunk_index+1 == chunks.size()) {
// last chunk
return file_size - chunk_index * chunk_size;
return file_size - (uint64_t(chunk_index) * uint64_t(chunk_size));
} else {
return chunk_size;
}