mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Fix serialization of std::time_t by casting to u64 first (#8353)
Fixes #8332
This commit is contained in:
parent
77961aa73d
commit
3b25b807f3
4 changed files with 4 additions and 22 deletions
|
@ -408,7 +408,9 @@ void Client::handleCommand_ChatMessage(NetworkPacket *pkt)
|
|||
return;
|
||||
}
|
||||
|
||||
*pkt >> chatMessage->sender >> chatMessage->message >> chatMessage->timestamp;
|
||||
u64 timestamp;
|
||||
*pkt >> chatMessage->sender >> chatMessage->message >> timestamp;
|
||||
chatMessage->timestamp = static_cast<std::time_t>(timestamp);
|
||||
|
||||
chatMessage->type = (ChatMessageType) message_type;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue