summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp/src/connection.cpp')
-rw-r--r--protocols/WhatsApp/src/connection.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/protocols/WhatsApp/src/connection.cpp b/protocols/WhatsApp/src/connection.cpp
index 2b87830046..e5cb3b034f 100644
--- a/protocols/WhatsApp/src/connection.cpp
+++ b/protocols/WhatsApp/src/connection.cpp
@@ -143,7 +143,9 @@ void WhatsAppProto::stayConnectedLoop(void*)
CODE_BLOCK_TRY
- std::string password = ptrA((char*)mir_base64_decode(pass.c_str(),0));
+ unsigned passLen;
+ ptrA passBin((char*)mir_base64_decode(pass.c_str(), &passLen));
+ std::string password(passBin, passLen);
BYTE UseSSL = db_get_b(NULL, this->ModuleName(), WHATSAPP_KEY_SSL, 0);
if (UseSSL) {
this->conn = new WASocketConnection("c.whatsapp.net", 443);