فهرست منبع

added per foof's point that op_combined does not overload beyond a 255 byte packet

Also trying to see if garbage packets come up or not (not seeing any PACKET__ERROR, so trying to just hardcode a printf to see if we get one)..
Supports Issue #61
Image 4 سال پیش
والد
کامیت
99b71b2049
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      EQ2/source/common/EQStream.cpp

+ 3 - 2
EQ2/source/common/EQStream.cpp

@@ -230,8 +230,8 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
 #endif
 				while(processed<p->size) {
 					if ((subpacket_length=(unsigned char)*(p->pBuffer+processed))==0xff) {
-						subpacket_length=ntohs(*(uint16 *)(p->pBuffer+processed+1));
-						offset = 3;
+						subpacket_length=255;
+						offset = 1;
 					}
 					else
 						offset = 1;
@@ -259,6 +259,7 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
 						//Garbage packet?
 						crypto->RC4Decrypt(p->pBuffer + processed + offset, subpacket_length);
 						LogWrite(PACKET__ERROR, 0, "Packet", "Garbage packet?!:");
+						printf("!!!!!!!!!Garbage Packet!!!!!!!!!!!!!:\n");
 						DumpPacket(p->pBuffer + processed + offset, subpacket_length);
 					}
 					processed+=subpacket_length+offset;