Merge pull request #3766 from Feoramund/fix-rng-state

Fix `default_random_generator_proc` not using state
This commit is contained in:
gingerBill
2024-06-15 20:36:10 +01:00
committed by GitHub

View File

@@ -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: