fix for bad handling of EQProtocolPacket creation

This commit is contained in:
Image 2021-05-20 09:52:07 -04:00
parent 22930a7daa
commit bacfb3151e

View file

@ -300,6 +300,12 @@ void EQStream::ProcessPacket(EQProtocolPacket *p, EQProtocolPacket* lastp)
ProcessPacket(subp, p);
delete subp;
}
else
{
printf("!!!!!!!!!Garbage Packet Unknown!!!!!!!!!!!!!\n");
DumpPacket(p->pBuffer + processed + offset, subpacket_length);
}
if(prevPacket)
{
printf("prevPacketSize: %u\n", prevPacket->size);
@ -1642,7 +1648,7 @@ DumpPacket(buffer, length);
DumpPacket(buffer, newlength);
#endif
uint16 opcode=ntohs(*(const uint16 *)newbuffer);
if(opcode <= OP_OutOfSession)
if(opcode > 0 && opcode <= OP_OutOfSession)
{
EQProtocolPacket p(newbuffer,newlength);
ProcessPacket(&p);