mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 14:48:47 +00:00
Fix core:sync/chan for rand
This commit is contained in:
@@ -476,10 +476,7 @@ select_raw :: proc "odin" (recvs: []^Raw_Chan, sends: []^Raw_Chan, send_msgs: []
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
r: ^rand.Rand = nil
|
select_idx = rand.int_max(count) if count > 0 else 0
|
||||||
|
|
||||||
|
|
||||||
select_idx = rand.int_max(count, r) if count > 0 else 0
|
|
||||||
|
|
||||||
sel := candidates[select_idx]
|
sel := candidates[select_idx]
|
||||||
if sel.is_recv {
|
if sel.is_recv {
|
||||||
|
|||||||
Reference in New Issue
Block a user