aboutsummaryrefslogtreecommitdiffstats
path: root/community/syncthing/correct_block_size_calculation_on_32_bits.patch
blob: db0e8988175bdb54695c0e00eff85331fcd2f5f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- a/lib/protocol/protocol.go
+++ b/lib/protocol/protocol.go
Author: Jakob Borg <jakob@kastelo.net>
Date:   Wed Jun 6 09:59:33 2018 +0200

    lib/protocol: Correct block size calculation on 32 bit archs (fixes #4990) (#4991)
@@ -54,7 +54,7 @@
 func BlockSize(fileSize int64) int {
 	var blockSize int
 	for _, blockSize = range BlockSizes {
-		if fileSize < int64(DesiredPerFileBlocks*blockSize) {
+		if fileSize < DesiredPerFileBlocks*int64(blockSize) {
 			break
 		}
 	}