From 6419e49f4bdfa8956a6c24dd2fa897bf728b1151 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 17 Jul 2015 16:35:26 -0700 Subject: [PATCH] call QIODevice constructor from Packet copy --- libraries/networking/src/udt/Packet.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/networking/src/udt/Packet.cpp b/libraries/networking/src/udt/Packet.cpp index ab757133ca..5be229e129 100644 --- a/libraries/networking/src/udt/Packet.cpp +++ b/libraries/networking/src/udt/Packet.cpp @@ -100,8 +100,11 @@ Packet::Packet(std::unique_ptr data, qint64 size, const HifiSockAddr& send _payloadStart = _packet.get() + (_packetSize - _payloadCapacity); } -Packet::Packet(const Packet& other) { +Packet::Packet(const Packet& other) : + QIODevice() +{ *this = other; + this->seek(other.pos()); } Packet& Packet::operator=(const Packet& other) {