diff options
| author | jackpoz <giacomopoz@gmail.com> | 2014-10-19 15:09:15 +0200 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2014-10-19 15:09:15 +0200 |
| commit | 5b08387792dae0afbf91ab74808dc978bf418bca (patch) | |
| tree | 30b3139ac0dcf1eda1513741d97e6b3db004ca00 /src/server/scripts/Commands | |
| parent | 035bda05adc12245e5c59d554c30092efdb64460 (diff) | |
Core/Misc: Remove unsafe not thread-safe localtime() calls
Replace not thread-safe localtime() calls with thread-safe localtime_r().
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_guild.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/scripts/Commands/cs_guild.cpp b/src/server/scripts/Commands/cs_guild.cpp index e06fbde868c..e2428407c7b 100644 --- a/src/server/scripts/Commands/cs_guild.cpp +++ b/src/server/scripts/Commands/cs_guild.cpp @@ -280,7 +280,8 @@ public: // Format creation date char createdDateStr[20]; time_t createdDate = guild->GetCreatedDate(); - strftime(createdDateStr, 20, "%Y-%m-%d %H:%M:%S", localtime(&createdDate)); + tm localTm; + strftime(createdDateStr, 20, "%Y-%m-%d %H:%M:%S", localtime_r(&createdDate, &localTm)); handler->PSendSysMessage(LANG_GUILD_INFO_CREATION_DATE, createdDateStr); // Creation Date handler->PSendSysMessage(LANG_GUILD_INFO_MEMBER_COUNT, guild->GetMemberCount()); // Number of Members |
