aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-07-13 13:09:55 +0100
committergingerBill <bill@gingerbill.org>2021-07-13 13:09:55 +0100
commitf29b51efddcc90c4545119fa77772e4a03e71719 (patch)
tree8738af4343eea09542a3458ebd2367df68e341eb /src
parent3930a32b0c1fd16f8fda862248c6abbbe47c747d (diff)
Fix `gb_shuffle`
Diffstat (limited to 'src')
-rw-r--r--src/gb/gb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gb/gb.h b/src/gb/gb.h
index e5688aca6..187b6628b 100644
--- a/src/gb/gb.h
+++ b/src/gb/gb.h
@@ -6162,7 +6162,7 @@ void gb_shuffle(void *base, isize count, isize size) {
a = cast(u8 *)base + (count-1) * size;
for (i = count; i > 1; i--) {
- j = gb_random_gen_isize(&random) % i;
+ j = cast(usize)gb_random_gen_u64(&random) % i;
gb_memswap(a, cast(u8 *)base + j*size, size);
a -= size;
}