summaryrefslogtreecommitdiffstats
path: root/src/Protocol/ProtocolRecognizer.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-04-06 21:43:23 +0200
committerHowaner <franzi.moos@googlemail.com>2014-04-06 21:43:23 +0200
commit7da308a7e158542fba0b28d3ad0e865b9e60bfc4 (patch)
tree84e11eab9c0608e71acedae999bbc3fba9c95d2a /src/Protocol/ProtocolRecognizer.cpp
parentAdd CanChangeDirtToGrass function to Block Handlers. (diff)
parentUpdated cWorld::CreateProjectile() documentation (diff)
downloadcuberite-7da308a7e158542fba0b28d3ad0e865b9e60bfc4.tar
cuberite-7da308a7e158542fba0b28d3ad0e865b9e60bfc4.tar.gz
cuberite-7da308a7e158542fba0b28d3ad0e865b9e60bfc4.tar.bz2
cuberite-7da308a7e158542fba0b28d3ad0e865b9e60bfc4.tar.lz
cuberite-7da308a7e158542fba0b28d3ad0e865b9e60bfc4.tar.xz
cuberite-7da308a7e158542fba0b28d3ad0e865b9e60bfc4.tar.zst
cuberite-7da308a7e158542fba0b28d3ad0e865b9e60bfc4.zip
Diffstat (limited to 'src/Protocol/ProtocolRecognizer.cpp')
-rw-r--r--src/Protocol/ProtocolRecognizer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Protocol/ProtocolRecognizer.cpp b/src/Protocol/ProtocolRecognizer.cpp
index 3b9003e60..3f7d7b254 100644
--- a/src/Protocol/ProtocolRecognizer.cpp
+++ b/src/Protocol/ProtocolRecognizer.cpp
@@ -794,7 +794,7 @@ AString cProtocolRecognizer::GetAuthServerID(void)
-void cProtocolRecognizer::SendData(const char * a_Data, int a_Size)
+void cProtocolRecognizer::SendData(const char * a_Data, size_t a_Size)
{
// This is used only when handling the server ping
m_Client->SendData(a_Data, a_Size);
@@ -854,7 +854,7 @@ bool cProtocolRecognizer::TryRecognizeProtocol(void)
// This must be a lengthed protocol, try if it has the entire initial handshake packet:
m_Buffer.ResetRead();
UInt32 PacketLen;
- UInt32 ReadSoFar = m_Buffer.GetReadableSpace();
+ UInt32 ReadSoFar = (UInt32)m_Buffer.GetReadableSpace();
if (!m_Buffer.ReadVarInt(PacketLen))
{
// Not enough bytes for the packet length, keep waiting
@@ -931,7 +931,7 @@ bool cProtocolRecognizer::TryRecognizeLengthlessProtocol(void)
bool cProtocolRecognizer::TryRecognizeLengthedProtocol(UInt32 a_PacketLengthRemaining)
{
UInt32 PacketType;
- UInt32 NumBytesRead = m_Buffer.GetReadableSpace();
+ UInt32 NumBytesRead = (UInt32)m_Buffer.GetReadableSpace();
if (!m_Buffer.ReadVarInt(PacketType))
{
return false;
@@ -962,7 +962,7 @@ bool cProtocolRecognizer::TryRecognizeLengthedProtocol(UInt32 a_PacketLengthRema
m_Buffer.ReadBEShort(ServerPort);
m_Buffer.ReadVarInt(NextState);
m_Buffer.CommitRead();
- m_Protocol = new cProtocol172(m_Client, ServerAddress, ServerPort, NextState);
+ m_Protocol = new cProtocol172(m_Client, ServerAddress, (UInt16)ServerPort, NextState);
return true;
}
}