aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/select.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/select.go')
-rw-r--r--src/runtime/select.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/select.go b/src/runtime/select.go
index 0d846b1470..4a744a1967 100644
--- a/src/runtime/select.go
+++ b/src/runtime/select.go
@@ -270,7 +270,7 @@ func selectgoImpl(sel *hselect) (uintptr, uint16) {
pollslice := slice{unsafe.Pointer(sel.pollorder), int(sel.ncase), int(sel.ncase)}
pollorder := *(*[]uint16)(unsafe.Pointer(&pollslice))
for i := 1; i < int(sel.ncase); i++ {
- j := int(fastrand()) % (i + 1)
+ j := fastrand() % uint32(i+1)
pollorder[i] = pollorder[j]
pollorder[j] = uint16(i)
}