summaryrefslogtreecommitdiffstats
path: root/src/Protocol/ProtocolRecognizer.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-05-08 20:16:35 +0200
committerMattes D <github@xoft.cz>2014-05-08 20:16:35 +0200
commitc4ea25e136026004526a63516cbed498e2b6fabe (patch)
tree41545a10b134ea1fc6e58913fc71c4695cdc8297 /src/Protocol/ProtocolRecognizer.cpp
parentMerge pull request #989 from Howaner/Anvil (diff)
downloadcuberite-c4ea25e136026004526a63516cbed498e2b6fabe.tar
cuberite-c4ea25e136026004526a63516cbed498e2b6fabe.tar.gz
cuberite-c4ea25e136026004526a63516cbed498e2b6fabe.tar.bz2
cuberite-c4ea25e136026004526a63516cbed498e2b6fabe.tar.lz
cuberite-c4ea25e136026004526a63516cbed498e2b6fabe.tar.xz
cuberite-c4ea25e136026004526a63516cbed498e2b6fabe.tar.zst
cuberite-c4ea25e136026004526a63516cbed498e2b6fabe.zip
Diffstat (limited to 'src/Protocol/ProtocolRecognizer.cpp')
-rw-r--r--src/Protocol/ProtocolRecognizer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Protocol/ProtocolRecognizer.cpp b/src/Protocol/ProtocolRecognizer.cpp
index 22dfe7c88..667fb5cef 100644
--- a/src/Protocol/ProtocolRecognizer.cpp
+++ b/src/Protocol/ProtocolRecognizer.cpp
@@ -871,7 +871,7 @@ bool cProtocolRecognizer::TryRecognizeProtocol(void)
// Not enough bytes for the packet length, keep waiting
return false;
}
- ReadSoFar -= m_Buffer.GetReadableSpace();
+ ReadSoFar -= (UInt32)m_Buffer.GetReadableSpace();
if (!m_Buffer.CanReadBytes(PacketLen))
{
// Not enough bytes for the packet, keep waiting
@@ -961,7 +961,7 @@ bool cProtocolRecognizer::TryRecognizeLengthedProtocol(UInt32 a_PacketLengthRema
{
return false;
}
- NumBytesRead -= m_Buffer.GetReadableSpace();
+ NumBytesRead -= (UInt32)m_Buffer.GetReadableSpace();
switch (ProtocolVersion)
{
case PROTO_VERSION_1_7_2: