summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-04-04 10:13:25 +0200
committermadmaxoft <github@xoft.cz>2014-04-04 10:13:25 +0200
commit8825d30aabbee8cb2e452dc5a17deb6f9b6892a7 (patch)
tree1f06f2d45652458c0490b794eae6a9e17596c85e /src/Protocol/Protocol17x.cpp
parentFixed Clang warnings in itemhandlers. (diff)
downloadcuberite-8825d30aabbee8cb2e452dc5a17deb6f9b6892a7.tar
cuberite-8825d30aabbee8cb2e452dc5a17deb6f9b6892a7.tar.gz
cuberite-8825d30aabbee8cb2e452dc5a17deb6f9b6892a7.tar.bz2
cuberite-8825d30aabbee8cb2e452dc5a17deb6f9b6892a7.tar.lz
cuberite-8825d30aabbee8cb2e452dc5a17deb6f9b6892a7.tar.xz
cuberite-8825d30aabbee8cb2e452dc5a17deb6f9b6892a7.tar.zst
cuberite-8825d30aabbee8cb2e452dc5a17deb6f9b6892a7.zip
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-rw-r--r--src/Protocol/Protocol17x.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index c678fc9a0..b987294b0 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -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;