Fixed some Clang warnings in protocols.
This commit is contained in:
@@ -1988,14 +1988,14 @@ void cProtocol172::WritePacket(cByteBuffer & a_Packet)
|
||||
|
||||
|
||||
|
||||
void cProtocol172::SendData(const char * a_Data, int a_Size)
|
||||
void cProtocol172::SendData(const char * a_Data, size_t a_Size)
|
||||
{
|
||||
if (m_IsEncrypted)
|
||||
{
|
||||
Byte Encrypted[8192]; // Larger buffer, we may be sending lots of data (chunks)
|
||||
while (a_Size > 0)
|
||||
{
|
||||
size_t NumBytes = ((size_t)a_Size > sizeof(Encrypted)) ? sizeof(Encrypted) : (size_t)a_Size;
|
||||
size_t NumBytes = (a_Size > sizeof(Encrypted)) ? sizeof(Encrypted) : a_Size;
|
||||
m_Encryptor.ProcessData(Encrypted, (Byte *)a_Data, NumBytes);
|
||||
m_Client->SendData((const char *)Encrypted, NumBytes);
|
||||
a_Size -= NumBytes;
|
||||
|
||||
Reference in New Issue
Block a user