diff options
author | George Hazan <ghazan@miranda.im> | 2018-01-16 16:21:00 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-01-16 16:21:00 +0300 |
commit | 634a32a8d9114b1da1ffd0dc2b78dde3060a731f (patch) | |
tree | 7bb66f2941c6aff4f0b1ec6807e5c3a043dfe5d6 /protocols/ICQCorp/src/protocol.cpp | |
parent | 954ee9077fb34e5e6dcda3485ae9c192d9b19fd2 (diff) |
ICQCorp:
- crash fixed when one sends a file;
- all file names went to Unicode;
- all messages are being send in Utf8 instead of ANSI;
- version bump;
Diffstat (limited to 'protocols/ICQCorp/src/protocol.cpp')
-rw-r--r-- | protocols/ICQCorp/src/protocol.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp index e38e9b9e31..d57ceaaad1 100644 --- a/protocols/ICQCorp/src/protocol.cpp +++ b/protocols/ICQCorp/src/protocol.cpp @@ -1548,7 +1548,7 @@ ICQEvent *ICQ::sendReadAwayMsg(ICQUser *u) ///////////////////////////////////////////////////////////////////////////////
-ICQTransfer *ICQ::sendFile(ICQUser *u, char *description, char *filename, unsigned int size, char **files)
+ICQTransfer *ICQ::sendFile(ICQUser *u, char *description, char *filename, unsigned int size, wchar_t **files)
{
if (!u->socket.connected() && !openConnection(u->socket))
return nullptr;
@@ -1558,16 +1558,16 @@ ICQTransfer *ICQ::sendFile(ICQUser *u, char *description, char *filename, unsign ICQTransfer *transfer = new ICQTransfer(u, tcpSequenceVal);
for (i = 0; files[i]; i++);
- transfer->files = new char*[i + 1];
- for (i = 0; files[i]; i++) transfer->files[i] = _strdup(files[i]);
+ transfer->files = new wchar_t*[i + 1];
+ for (i = 0; files[i]; i++) transfer->files[i] = _wcsdup(files[i]);
transfer->files[i] = nullptr;
transfer->description = _strdup(description);
transfer->count = i;
transfer->totalSize = size;
- transfer->path = _strdup(transfer->files[0]);
- char *s = strrchr(transfer->path, '\\');
+ transfer->path = _wcsdup(transfer->files[0]);
+ wchar_t *s = wcsrchr(transfer->path, '\\');
if (s != nullptr)
*s = 0;
|