From abbec7be53ade1d599d1c02f91b03e2f66d82f33 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 15 Nov 2022 20:47:19 +0300 Subject: WhatsApp: fix for negative message ids --- protocols/WhatsApp/src/message.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'protocols/WhatsApp') diff --git a/protocols/WhatsApp/src/message.cpp b/protocols/WhatsApp/src/message.cpp index e82cef0334..df272eb0b0 100644 --- a/protocols/WhatsApp/src/message.cpp +++ b/protocols/WhatsApp/src/message.cpp @@ -366,6 +366,8 @@ int WhatsAppProto::SendTextMessage(const char *jid, const char *pszMsg) char szMsgId[40]; __int64 msgId; Utils_GetRandom(&msgId, sizeof(msgId)); + if (msgId < 0) + msgId = -msgId; _i64toa(msgId, szMsgId, 10); // mother node for all participants -- cgit v1.2.3