diff --git a/cmd/syncthing/random.go b/cmd/syncthing/random.go index 157056bf1..e51ce7f2a 100644 --- a/cmd/syncthing/random.go +++ b/cmd/syncthing/random.go @@ -49,9 +49,9 @@ func randomString(l int) string { // randomInt64 returns a strongly random int64, slowly func randomInt64() int64 { var bs [8]byte - n, err := io.ReadFull(cryptoRand.Reader, bs[:]) - if n != 8 || err != nil { - panic("randomness failure") + _, err := io.ReadFull(cryptoRand.Reader, bs[:]) + if err != nil { + panic("randomness failure: " + err.Error()) } return seedFromBytes(bs[:]) }