diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index c14488de0..bf3910dcf 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -254,7 +254,7 @@ void CPatchManager::init(const std::vector& patchURIs, const std::s } srand(NLMISC::CTime::getSecondsSince1970()); - UsedServer = (sint)((float)(rand() / (RAND_MAX+1)) * (sint)PatchServers.size()); + UsedServer = (sint)(((double)rand() / ((double)RAND_MAX+1.0)) * (double)PatchServers.size()); ServerPath = CPath::standardizePath (sServerPath); ServerVersion = sServerVersion;