diff options
-rw-r--r-- | protocols/FacebookRM/src/main.cpp | 3 | ||||
-rw-r--r-- | protocols/FacebookRM/src/utils.cpp | 1 |
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))];
}
|