Fix splitIntoRandomChunks

pull/81/head
Pagran 5 years ago
parent 80a0a7fce1
commit df68f7d72e

@ -8,7 +8,7 @@ import (
)
const (
maxChunkSize = 4
maxChunkSize = 5
minCaseCount = 3
)
@ -26,7 +26,7 @@ func splitIntoRandomChunks(data []byte) [][]byte {
var chunks [][]byte
for len(data) > 0 {
chunkSize := 1 + mathrand.Intn(maxChunkSize)
chunkSize := 1 + mathrand.Intn(maxChunkSize-1)
if chunkSize > len(data) {
chunkSize = len(data)
}

Loading…
Cancel
Save