summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-11-02 17:46:37 +0100
committermadmaxoft <github@xoft.cz>2013-11-03 11:59:06 +0100
commit0652e7a4c88151bf1bf708ffc75a7a98d18775da (patch)
treeb062ca17c7caccb55feb59c2dea43356e79c9882
parentAdded cEntity:GetYaw() and cEntity:SetYaw(). (diff)
downloadcuberite-0652e7a4c88151bf1bf708ffc75a7a98d18775da.tar
cuberite-0652e7a4c88151bf1bf708ffc75a7a98d18775da.tar.gz
cuberite-0652e7a4c88151bf1bf708ffc75a7a98d18775da.tar.bz2
cuberite-0652e7a4c88151bf1bf708ffc75a7a98d18775da.tar.lz
cuberite-0652e7a4c88151bf1bf708ffc75a7a98d18775da.tar.xz
cuberite-0652e7a4c88151bf1bf708ffc75a7a98d18775da.tar.zst
cuberite-0652e7a4c88151bf1bf708ffc75a7a98d18775da.zip
-rw-r--r--Tools/ProtoProxy/Connection.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Tools/ProtoProxy/Connection.cpp b/Tools/ProtoProxy/Connection.cpp
index b99415900..143935fe5 100644
--- a/Tools/ProtoProxy/Connection.cpp
+++ b/Tools/ProtoProxy/Connection.cpp
@@ -718,6 +718,7 @@ bool cConnection::DecodeServersPackets(const char * a_Data, int a_Size)
)
{
// Not a complete packet yet
+ m_ServerBuffer.ResetRead();
break;
}
UInt32 PacketType, PacketReadSoFar;
@@ -2683,6 +2684,7 @@ bool cConnection::HandleServerWindowOpen(void)
bool cConnection::HandleServerUnknownPacket(UInt32 a_PacketType, UInt32 a_PacketLen, UInt32 a_PacketReadSoFar)
{
AString Data;
+ ASSERT(a_PacketLen >= a_PacketReadSoFar);
if (!m_ServerBuffer.ReadString(Data, a_PacketLen - a_PacketReadSoFar))
{
return false;