summaryrefslogtreecommitdiff
path: root/source/kit/mersenne_twister_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/kit/mersenne_twister_64.c')
-rw-r--r--source/kit/mersenne_twister_64.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/kit/mersenne_twister_64.c b/source/kit/mersenne_twister_64.c
index 926a886..c40806e 100644
--- a/source/kit/mersenne_twister_64.c
+++ b/source/kit/mersenne_twister_64.c
@@ -8,8 +8,8 @@
void kit_mt64_init_array(kit_mt64_state_t *const state,
ptrdiff_t const size,
uint64_t const *const seed) {
- for (ptrdiff_t i = 0; i < size && i < KIT_MT64_N; i++)
- state->mt[i] = seed[i];
+ ptrdiff_t i;
+ for (i = 0; i < size && i < KIT_MT64_N; i++) state->mt[i] = seed[i];
for (state->index = size; state->index < KIT_MT64_N; state->index++)
state->mt[state->index] = (6364136223846793005ull *
(state->mt[state->index - 1] ^