From 634a32a8d9114b1da1ffd0dc2b78dde3060a731f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 16 Jan 2018 16:21:00 +0300 Subject: 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; --- protocols/ICQCorp/src/protocol.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'protocols/ICQCorp/src/protocol.cpp') 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; -- cgit v1.2.3