From f761572b25b89091485f4f40de6ec2bfdc1293d8 Mon Sep 17 00:00:00 2001 From: Alice Ogeda Date: Tue, 14 Feb 2023 10:28:13 -0300 Subject: [PATCH] small fixes/removing useless code; --- src/common/Network/PacketContainer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/common/Network/PacketContainer.cpp b/src/common/Network/PacketContainer.cpp index fad6f951..530faf41 100644 --- a/src/common/Network/PacketContainer.cpp +++ b/src/common/Network/PacketContainer.cpp @@ -55,9 +55,11 @@ void Network::Packets::PacketContainer::fillSendBuffer( std::vector< uint8_t >& pPacket->setTargetActor( m_segmentTargetOverride ); } + // get aligned and original packet data size for offset and copy auto packetAlignedSize = pPacket->getAlignedSize(); auto packetOriginalSize = pPacket->getSize(); + // set packet size in seg header to aligned size pPacket->setSize( packetAlignedSize ); // copy packet data into buffer @@ -67,9 +69,6 @@ void Network::Packets::PacketContainer::fillSendBuffer( std::vector< uint8_t >& offset += packetAlignedSize; } - // buffer has possibly been resized for alignment - m_ipcHdr.size = tempBuffer.size(); - memcpy( &tempBuffer[ 0 ], &m_ipcHdr, sizeof( FFXIVARR_PACKET_HEADER ) ); sendBuffer.assign( &tempBuffer[ 0 ], &tempBuffer[ 0 ] + m_ipcHdr.size );