From 397cf7f00db6880090c051acad5bb35f66ed33ce Mon Sep 17 00:00:00 2001 From: Marc-Eric Martel Date: Thu, 26 Oct 2023 10:55:36 -0400 Subject: [PATCH] erratum III --- SQCSim-srv/server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQCSim-srv/server.cpp b/SQCSim-srv/server.cpp index 34715e5..90c97fc 100644 --- a/SQCSim-srv/server.cpp +++ b/SQCSim-srv/server.cpp @@ -99,7 +99,6 @@ int Server::Ready() { return 1; } - srand(time(NULL)); buildIdList(ID_LIST_SIZE); Log("À l'écoute sur le port: " + std::to_string(SRV_PORT), false, false); @@ -240,6 +239,7 @@ void Server::Log(std::string str, bool is_error = false, bool is_fatal = false) void Server::buildIdList(size_t size) { std::set lst; + srand(time(NULL)); do lst.insert(((uint64_t)rand() << 32 | rand())); // EIGHT SIX SEVENFIVE THREE AUGHT NIIIIIIiIIiiIiINE! while (lst.size() < size);