summaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2019-03-10 18:53:02 +0000
committerGitHub <noreply@github.com>2019-03-10 18:53:02 +0000
commit3b25b807f33bff885bd840ec0dc9e2d95b392f81 (patch)
tree699acec74f7fcc070666a2e4cb1ddc572ccc3834 /src/server.cpp
parent77961aa73d1947a2eabaa832319b7d73db6d13c2 (diff)
downloadminetest-3b25b807f33bff885bd840ec0dc9e2d95b392f81.tar.gz
minetest-3b25b807f33bff885bd840ec0dc9e2d95b392f81.tar.bz2
minetest-3b25b807f33bff885bd840ec0dc9e2d95b392f81.zip
Fix serialization of std::time_t by casting to u64 first (#8353)
Fixes #8332
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp2
1 files changed, 1 insertions, 1 deletions
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);