1
0
Fork 0

ProtoProxy: Fixed handling of incomplete packets.

This commit is contained in:
madmaxoft 2013-11-02 17:46:37 +01:00
parent 9bdc94053e
commit 0652e7a4c8
1 changed files with 2 additions and 0 deletions

View File

@ -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;