summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-14 17:57:13 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-14 17:57:13 +0300
commitce3ecf15a3ba126e665500270ef7fc8584d0b9b2 (patch)
tree50cf12d464c4391d26de6f191465b955dfb928b1
parent7b9295189c8be1575a5d45bd3ba69cf64dc31644 (diff)
downloadmanaplus-ce3ecf15a3ba126e665500270ef7fc8584d0b9b2.tar.gz
manaplus-ce3ecf15a3ba126e665500270ef7fc8584d0b9b2.tar.bz2
manaplus-ce3ecf15a3ba126e665500270ef7fc8584d0b9b2.tar.xz
manaplus-ce3ecf15a3ba126e665500270ef7fc8584d0b9b2.zip
Fix type cast in stringutils.
-rw-r--r--src/utils/stringutils.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index 66f61f168..16f45932d 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -927,8 +927,9 @@ std::string removeToken(std::string &str, const std::string &token)
std::string timeToStr(const uint32_t time)
{
char buf[101];
- const uint64_t tempTime = static_cast<uint64_t>(time);
- tm *const timeInfo = localtime(reinterpret_cast<const time_t*>(&tempTime));
+ time_t tempTime = reinterpret_cast<time_t>(
+ static_cast<long int>(time));
+ tm *const timeInfo = localtime(&tempTime);
if (strftime(&buf[0], 100, "%Y-%m-%d_%H-%M-%S", timeInfo))
return std::string(buf);
else