aboutsummaryrefslogtreecommitdiff
path: root/base/runtime
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2024-06-20 17:54:37 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2024-06-20 17:54:37 +0200
commit91cc006e8f7340e424235d3b752db71494528c6a (patch)
tree6ff4548822b46c8732c9777069c99a6c532019d3 /base/runtime
parentac4577ca66ffbaa6bf750d241f92b8e081dce61a (diff)
Fix unaligned store for rand
Diffstat (limited to 'base/runtime')
-rw-r--r--base/runtime/random_generator.odin2
1 files changed, 1 insertions, 1 deletions
diff --git a/base/runtime/random_generator.odin b/base/runtime/random_generator.odin
index 5e0ba2540..95ba6ece9 100644
--- a/base/runtime/random_generator.odin
+++ b/base/runtime/random_generator.odin
@@ -89,7 +89,7 @@ default_random_generator_proc :: proc(data: rawptr, mode: Random_Generator_Mode,
switch len(p) {
case size_of(u64):
// 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:
// All other cases.
pos := i8(0)