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;