summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-01-03 22:39:55 +0100
committerMattes D <github@xoft.cz>2015-01-03 22:39:55 +0100
commit7d13a2a77a030a4f458ac01a51f8a4216a4a44b4 (patch)
tree7d871cfed77fe33748ebe4eb4c588f74050b2a9b /src
parentProtocols: Ignore garbage data at the end of PluginMessage packets. (diff)
downloadcuberite-7d13a2a77a030a4f458ac01a51f8a4216a4a44b4.tar
cuberite-7d13a2a77a030a4f458ac01a51f8a4216a4a44b4.tar.gz
cuberite-7d13a2a77a030a4f458ac01a51f8a4216a4a44b4.tar.bz2
cuberite-7d13a2a77a030a4f458ac01a51f8a4216a4a44b4.tar.lz
cuberite-7d13a2a77a030a4f458ac01a51f8a4216a4a44b4.tar.xz
cuberite-7d13a2a77a030a4f458ac01a51f8a4216a4a44b4.tar.zst
cuberite-7d13a2a77a030a4f458ac01a51f8a4216a4a44b4.zip
Diffstat (limited to 'src')
-rw-r--r--src/Protocol/Protocol17x.cpp2
-rw-r--r--src/Protocol/Protocol18x.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index 4e985355a..dac1ebde8 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -2272,7 +2272,7 @@ void cProtocol172::HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, const
if (BytesRead < static_cast<size_t>(a_PayloadLength))
{
LOGD("Protocol 1.7: Skipping garbage data at the end of a vanilla MC|AdvCdm packet, %u bytes",
- a_PayloadLength - BytesRead
+ static_cast<unsigned>(a_PayloadLength - BytesRead)
);
a_ByteBuffer.SkipRead(a_PayloadLength - BytesRead);
}
diff --git a/src/Protocol/Protocol18x.cpp b/src/Protocol/Protocol18x.cpp
index 21b098735..3c4e049bd 100644
--- a/src/Protocol/Protocol18x.cpp
+++ b/src/Protocol/Protocol18x.cpp
@@ -2336,7 +2336,7 @@ void cProtocol180::HandlePacketPluginMessage(cByteBuffer & a_ByteBuffer)
if (a_ByteBuffer.GetReadableSpace() > 1)
{
LOGD("Protocol 1.8: Skipping garbage data at the end of a vanilla PluginMessage packet, %u bytes",
- a_ByteBuffer.GetReadableSpace() - 1
+ static_cast<unsigned>(a_ByteBuffer.GetReadableSpace() - 1)
);
a_ByteBuffer.SkipRead(a_ByteBuffer.GetReadableSpace() - 1);
}