1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Fix serialization of std::time_t by casting to u64 first (#8353)

Fixes #8332
This commit is contained in:
rubenwardy 2019-03-10 18:53:02 +00:00 committed by GitHub
parent 77961aa73d
commit 3b25b807f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 22 deletions

View file

@ -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);