Commit e9131df3 authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Juan Batiz-Benet
parent 2cb4e59e
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
}, },
{ {
"ImportPath": "github.com/jbenet/go-random", "ImportPath": "github.com/jbenet/go-random",
"Rev": "e4585173eb8c47eea36c3dbff22f26f3f94d3586" "Rev": "2e83344e7dc7898f94501665af34edd4aa95a013"
}, },
{ {
"ImportPath": "github.com/kr/binarydist", "ImportPath": "github.com/kr/binarydist",
......
...@@ -26,10 +26,10 @@ func WritePseudoRandomBytes(count int64, w io.Writer, seed int64) error { ...@@ -26,10 +26,10 @@ func WritePseudoRandomBytes(count int64, w io.Writer, seed int64) error {
b = b[:bufsize] b = b[:bufsize]
} }
var n int64 var n uint32
for i := int64(0); i < bufsize; i++ { for i := int64(0); i < bufsize; {
n = randmath.Int63() n = randmath.Uint32()
for j := 0; j < 8 && i < bufsize; j++ { for j := 0; j < 4 && i < bufsize; j++ {
b[i] = byte(n & 0xff) b[i] = byte(n & 0xff)
n >>= 8 n >>= 8
i++ i++
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment