From c3bb1751d7f62a13a46f28c1eb67d9e20d8d6f7f Mon Sep 17 00:00:00 2001 From: nic-gaffney Date: Sun, 25 Jun 2023 23:21:02 -0500 Subject: Fixed standard library --- std/stdmath.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'std/stdmath.c') diff --git a/std/stdmath.c b/std/stdmath.c index c9a91c3..dad292f 100644 --- a/std/stdmath.c +++ b/std/stdmath.c @@ -2,10 +2,8 @@ #include #include -int randGen(int min, int max) { - time_t t; - - srand((unsigned) time(&t)); - - return rand() % (max - min + 1) + min; + +long long randGen(long long min, long long max) { + srandom((unsigned) time(NULL)); + return random() % (max - min + 1) + min; } -- cgit v1.2.3