Przeglądaj źródła

Rare case on the final embedded packet if there is an offset also should have been int8 not 16

Emagi 1 rok temu
rodzic
commit
d7fbb72b47
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      EQ2/source/common/EQStream.cpp

+ 1 - 1
EQ2/source/common/EQStream.cpp

@@ -266,7 +266,7 @@ bool EQStream::HandleEmbeddedPacket(EQProtocolPacket *p, int16 offset, int16 len
 		else if(p->pBuffer[offset] != 0xff && p->pBuffer[offset+1] == 0xff) {
 			uint8 new_length = 0;
 			
-			memcpy(&new_length, p->pBuffer, sizeof(int16));
+			memcpy(&new_length, p->pBuffer+offset, sizeof(int8));
 			if(new_length <= p->size) {
 				new_length -= 2;
 			EQProtocolPacket *subp=new EQProtocolPacket(p->pBuffer+offset+2, new_length, OP_Packet);