From 3b25b807f33bff885bd840ec0dc9e2d95b392f81 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sun, 10 Mar 2019 18:53:02 +0000 Subject: Fix serialization of std::time_t by casting to u64 first (#8353) Fixes #8332 --- src/server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server.cpp') diff --git a/src/server.cpp b/src/server.cpp index 701339ad8..003ad45b4 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1559,7 +1559,7 @@ void Server::SendChatMessage(session_t peer_id, const ChatMessage &message) NetworkPacket pkt(TOCLIENT_CHAT_MESSAGE, 0, peer_id); u8 version = 1; u8 type = message.type; - pkt << version << type << std::wstring(L"") << message.message << message.timestamp; + pkt << version << type << std::wstring(L"") << message.message << (u64)message.timestamp; if (peer_id != PEER_ID_INEXISTENT) { RemotePlayer *player = m_env->getPlayer(peer_id); -- cgit v1.2.3