From ce3ecf15a3ba126e665500270ef7fc8584d0b9b2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 14 May 2016 17:57:13 +0300 Subject: Fix type cast in stringutils. --- src/utils/stringutils.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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(time); - tm *const timeInfo = localtime(reinterpret_cast(&tempTime)); + time_t tempTime = reinterpret_cast( + static_cast(time)); + tm *const timeInfo = localtime(&tempTime); if (strftime(&buf[0], 100, "%Y-%m-%d_%H-%M-%S", timeInfo)) return std::string(buf); else -- cgit v1.2.3-70-g09d2