diff options
-rw-r--r-- | protocols/ICQCorp/src/protocol.cpp | 6 | ||||
-rw-r--r-- | protocols/ICQCorp/src/transfer.cpp | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp index 067baf4ddf..6f79c47cd6 100644 --- a/protocols/ICQCorp/src/protocol.cpp +++ b/protocols/ICQCorp/src/protocol.cpp @@ -1547,13 +1547,13 @@ ICQTransfer *ICQ::sendFile(ICQUser *u, char *description, char *filename, unsign if (!u->socket.connected() && !openConnection(u->socket))
return nullptr;
- unsigned int i;
-
ICQTransfer *transfer = new ICQTransfer(u, tcpSequenceVal);
+ int i;
for (i = 0; files[i]; i++);
transfer->files = new wchar_t*[i + 1];
- for (i = 0; files[i]; i++) transfer->files[i] = _wcsdup(files[i]);
+ for (i = 0; files[i]; i++)
+ transfer->files[i] = _wcsdup(files[i]);
transfer->files[i] = nullptr;
transfer->description = _strdup(description);
diff --git a/protocols/ICQCorp/src/transfer.cpp b/protocols/ICQCorp/src/transfer.cpp index f8b42e5b87..a13f961a43 100644 --- a/protocols/ICQCorp/src/transfer.cpp +++ b/protocols/ICQCorp/src/transfer.cpp @@ -228,8 +228,8 @@ void ICQTransfer::sendPacket0x02() Packet packet;
packet << (unsigned char)0x02
<< directory
- << ptrA(mir_utf8encodeW(wcsrchr(fileName, '\\') + 1)).get()
- << ptrA(mir_utf8encodeW(directoryName + mir_wstrlen(path) + 1)).get()
+ << _T2A(wcsrchr(fileName, '\\') + 1)
+ << _T2A(directoryName + mir_wstrlen(path) + 1)
<< fileSize
<< fileDate
<< speed;
@@ -327,8 +327,7 @@ void ICQTransfer::ack(unsigned int result) ProtoBroadcastAck(protoName, hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, this, 0);
socket.closeConnection();
- unsigned int i;
- for (i = 0; i < icqTransfers.size(); i++) {
+ for (size_t i = 0; i < icqTransfers.size(); i++) {
if (icqTransfers[i] == this) {
delete icqTransfers[i];
icqTransfers[i] = icqTransfers[icqTransfers.size() - 1];
|