浏览代码

go.crypto/ssh: fix messages_test.go on 32-bit platforms.

LGTM=dave
R=agl, dave
CC=golang-codereviews
https://golang.org/cl/88060043
Han-Wen Nienhuys 11 年之前
父节点
当前提交
dac81c328b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      ssh/messages_test.go

+ 1 - 1
ssh/messages_test.go

@@ -51,7 +51,7 @@ func (t *msgAllTypes) Generate(rand *rand.Rand, size int) reflect.Value {
 	m.Bool = rand.Intn(2) == 1
 	randomBytes(m.Array[:], rand)
 	m.Uint64 = uint64(rand.Int63n(1<<63 - 1))
-	m.Uint32 = uint32(rand.Intn(1 << 32))
+	m.Uint32 = uint32(rand.Intn((1 << 31) - 1))
 	m.Uint8 = uint8(rand.Intn(1 << 8))
 	m.String = string(m.Array[:])
 	m.Strings = randomNameList(rand)