fix header size for NLPacket writeTypeAndVersion

This commit is contained in:
Stephen Birarda 2015-08-10 10:10:43 -07:00
parent 5e3d3fc06b
commit 04c1d154ab

View file

@ -164,7 +164,7 @@ QByteArray NLPacket::hashForPacketAndSecret(const udt::Packet& packet, const QUu
} }
void NLPacket::writeTypeAndVersion() { void NLPacket::writeTypeAndVersion() {
auto headerOffset = Packet::localHeaderSize(isPartOfMessage()); auto headerOffset = Packet::totalHeaderSize(isPartOfMessage());
// Pack the packet type // Pack the packet type
memcpy(_packet.get() + headerOffset, &_type, sizeof(PacketType)); memcpy(_packet.get() + headerOffset, &_type, sizeof(PacketType));