summaryrefslogtreecommitdiff
path: root/protocols/ICQCorp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-12-17 11:27:34 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-12-17 11:27:34 +0000
commit05938ae432571acc8568920b95fd28fc5adfc33e (patch)
tree5925c49c1618152fdc9553f6a47334e8f729f9d9 /protocols/ICQCorp
parentc19568f52349d43abeb8b0bff5601a3506249c7a (diff)
ICQCorp: encoding fix, crash fix(?)
git-svn-id: http://svn.miranda-ng.org/main/trunk@15880 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/ICQCorp')
-rw-r--r--protocols/ICQCorp/src/protocol.cpp5
-rw-r--r--protocols/ICQCorp/src/services.cpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp
index 2ff22d3a41..5ec6c93449 100644
--- a/protocols/ICQCorp/src/protocol.cpp
+++ b/protocols/ICQCorp/src/protocol.cpp
@@ -1615,8 +1615,9 @@ ICQTransfer *ICQ::sendFile(ICQUser *u, char *description, char *filename, unsign
transfer->count = i;
transfer->totalSize = size;
- transfer->path = _strdup(files[0]);
- *strrchr(transfer->path, '\\') = 0;
+ transfer->path = mir_strdup(transfer->files[0]);
+ char *s = strrchr(transfer->path, '\\');
+ if (s != NULL) *s = 0;
icqTransfers.push_back(transfer);
transfer->ack(ACKRESULT_SENTREQUEST);
diff --git a/protocols/ICQCorp/src/services.cpp b/protocols/ICQCorp/src/services.cpp
index 6d19332f6f..a03ac228ad 100644
--- a/protocols/ICQCorp/src/services.cpp
+++ b/protocols/ICQCorp/src/services.cpp
@@ -178,7 +178,7 @@ static INT_PTR icqSendMessage(WPARAM, LPARAM lParam)
// uin = db_get_dw(ccs->hContact, ICQCORP_PROTONAME, "UIN", 0);
if (u == NULL || icq.statusVal <= ID_STATUS_OFFLINE) return 0;
- icqEvent = icq.sendMessage(u, (char*)ccs->lParam);
+ icqEvent = icq.sendMessage(u, ptrA(mir_utf8decodeA((char*)ccs->lParam)));
return icqEvent ? icqEvent->sequence : 0;
}