From bf168904899ca24fc86eb120a43780e84e161854 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sun, 4 Sep 2016 20:22:12 +0100 Subject: [PATCH] Use util_rand as there is no srand for rand to work --- src/network/NetworkServerAdvertiser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/NetworkServerAdvertiser.cpp b/src/network/NetworkServerAdvertiser.cpp index 4edc77149d..ffad725b08 100644 --- a/src/network/NetworkServerAdvertiser.cpp +++ b/src/network/NetworkServerAdvertiser.cpp @@ -29,6 +29,7 @@ extern "C" #include "../localisation/date.h" #include "../management/finance.h" #include "../peep/peep.h" + #include "../util/util.h" #include "../world/map.h" #include "../world/park.h" #include "http.h" @@ -231,7 +232,7 @@ private: char key[17]; for (int i = 0; i < 16; i++) { - int hexCharIndex = rand() % Util::CountOf(hexChars); + int hexCharIndex = util_rand() % Util::CountOf(hexChars); key[i] = hexChars[hexCharIndex]; } key[Util::CountOf(key) - 1] = 0;