Fix unaligned store for rand
This commit is contained in:
1 parent
ac4577ca66
commit
91cc006e8f
1 file changed
+1
-1
@@ -89,7 +89,7 @@ default_random_generator_proc :: proc(data: rawptr, mode: Random_Generator_Mode,
|
|||||||
switch len(p) {
|
switch len(p) {
|
||||||
case size_of(u64):
|
case size_of(u64):
|
||||||
// Fast path for a 64-bit destination.
|
// Fast path for a 64-bit destination.
|
||||||
(transmute(^u64)raw_data(p))^ = read_u64(r)
|
intrinsics.unaligned_store(transmute(^u64)raw_data(p), read_u64(r))
|
||||||
case:
|
case:
|
||||||
// All other cases.
|
// All other cases.
|
||||||
pos := i8(0)
|
pos := i8(0)
|
||||||
|
|||||||
Reference in new issue
Block a user