diff options
author | George Hazan <ghazan@miranda.im> | 2022-11-15 12:49:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-11-15 12:49:25 +0300 |
commit | f708f2a55a467092b70a537c2b97c9210440a420 (patch) | |
tree | bec7d1200a546bfdac30ec64278673217d6e6365 /protocols/WhatsApp/src/message.cpp | |
parent | 85bcf4d780a31fd88508ae42ba825394a0911a5d (diff) |
fixes #3245 (WhatsApp: crash on login) + code cleaning
Diffstat (limited to 'protocols/WhatsApp/src/message.cpp')
-rw-r--r-- | protocols/WhatsApp/src/message.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/WhatsApp/src/message.cpp b/protocols/WhatsApp/src/message.cpp index 4eeb62872a..e82cef0334 100644 --- a/protocols/WhatsApp/src/message.cpp +++ b/protocols/WhatsApp/src/message.cpp @@ -124,7 +124,7 @@ void WhatsAppProto::OnReceiveMessage(const WANode &node) } else throw "Invalid e2e type"; - if (!msgBody.data()) + if (msgBody.isEmpty()) throw "Invalid e2e message"; iDecryptable++; @@ -255,7 +255,7 @@ void WhatsAppProto::ProcessMessage(WAMSG type, const Wa__WebMessageInfo &msg) debugLogA("History sync notification"); if (auto *pHist = protoMsg->historysyncnotification) { MBinBuffer buf(DownloadEncryptedFile(directPath2url(pHist->directpath), pHist->mediakey, "History")); - if (buf.data()) { + if (!buf.isEmpty()) { MBinBuffer inflate(unzip(unpadBuffer16(buf))); proto::HistorySync sync(inflate); |