From ebf612394a92e9f697ed56c55fc236cb72b511c7 Mon Sep 17 00:00:00 2001 From: user Date: Mon, 20 Jul 2020 18:04:33 +1000 Subject: [PATCH] mingw compat --- colours.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/colours.c b/colours.c index af35690..4c84f8d 100644 --- a/colours.c +++ b/colours.c @@ -1,9 +1,11 @@ #include "colours.h" struct colour get_random_color(unsigned int seed) { - int red = rand_r(&seed) % 255; - int blue = rand_r(&seed) % 255; - int green = rand_r(&seed) % 255; + srand(seed); + + int red = rand() % 255; + int blue = rand() % 255; + int green = rand() % 255; struct colour col; col.r = red;