summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-07-15 15:35:48 +0000
committerRobert Pösel <robyer@seznam.cz>2014-07-15 15:35:48 +0000
commitaf9f7df6d22903be7f7a7c8a93d77355bbd7f958 (patch)
tree12f28262453657a49dadd748266f22b1637ab80f /protocols/FacebookRM
parent2565775ba80f0a732bae1e28bcc43ca410166825 (diff)
Facebook: Fix initializing random generator
git-svn-id: http://svn.miranda-ng.org/main/trunk@9808 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r--protocols/FacebookRM/src/main.cpp3
-rw-r--r--protocols/FacebookRM/src/utils.cpp1
2 files changed, 3 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/main.cpp b/protocols/FacebookRM/src/main.cpp
index 598dc2b5b9..8aa058ec4d 100644
--- a/protocols/FacebookRM/src/main.cpp
+++ b/protocols/FacebookRM/src/main.cpp
@@ -115,6 +115,9 @@ extern "C" int __declspec(dllexport) Load(void)
agent << __VERSION_STRING_DOTS;
g_strUserAgent = agent.str();
+ // Initialize random generator
+ srand(::time(NULL));
+
return 0;
}
diff --git a/protocols/FacebookRM/src/utils.cpp b/protocols/FacebookRM/src/utils.cpp
index 23f4ff4417..115a5d4350 100644
--- a/protocols/FacebookRM/src/utils.cpp
+++ b/protocols/FacebookRM/src/utils.cpp
@@ -449,7 +449,6 @@ std::string utils::text::rand_string(int len, const char *chars)
{
std::stringstream out;
- srand(::time(NULL));
for (int i = 0; i < len; ++i) {
out << chars[utils::number::random(0, (int)strlen(chars))];
}