mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-01 02:42:09 +00:00
Merge pull request #3766 from Feoramund/fix-rng-state
Fix `default_random_generator_proc` not using state
This commit is contained in:
@@ -73,7 +73,12 @@ default_random_generator_proc :: proc(data: rawptr, mode: Random_Generator_Mode,
|
||||
_ = read_u64(r)
|
||||
}
|
||||
|
||||
r := &global_rand_seed
|
||||
r: ^Default_Random_State = ---
|
||||
if data == nil {
|
||||
r = &global_rand_seed
|
||||
} else {
|
||||
r = cast(^Default_Random_State)data
|
||||
}
|
||||
|
||||
switch mode {
|
||||
case .Read:
|
||||
|
||||
Reference in New Issue
Block a user