From 56e8c6bea343f81d8c87e73eeffd1d2546a8949c Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Wed, 20 Jul 2022 21:28:09 -0700 Subject: modules/checkers: one more rand/rand_r conversion wired up to til_module_context.seed --- src/modules/checkers/checkers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/checkers/checkers.c b/src/modules/checkers/checkers.c index 7eee608..5554e21 100644 --- a/src/modules/checkers/checkers.c +++ b/src/modules/checkers/checkers.c @@ -203,7 +203,7 @@ static void checkers_render_fragment(til_module_context_t *context, unsigned tic } if (fill == CHECKERS_FILL_RANDOM || fill == CHECKERS_FILL_MIXED) - fill = rand() % CHECKERS_FILL_RANDOM; /* TODO: mixed should have a setting for controlling the ratios */ + fill = rand_r(&ctxt->til_module_context.seed) % CHECKERS_FILL_RANDOM; /* TODO: mixed should have a setting for controlling the ratios */ switch (ctxt->setup.fill) { case CHECKERS_FILL_SAMPLED: -- cgit v1.2.3