From aaafa7acd28e870102f425640996ba91dd285092 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Thu, 9 Jul 2015 14:20:04 -0700 Subject: [PATCH] Copy _type in assignment operators --- libraries/networking/src/Packet.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/networking/src/Packet.cpp b/libraries/networking/src/Packet.cpp index a5ab9d1716..ca1c66f4ca 100644 --- a/libraries/networking/src/Packet.cpp +++ b/libraries/networking/src/Packet.cpp @@ -68,6 +68,8 @@ Packet::Packet(const Packet& other) { } Packet& Packet::operator=(const Packet& other) { + _type = other._type; + _packetSize = other._packetSize; _packet = std::unique_ptr(new char(_packetSize)); memcpy(_packet.get(), other._packet.get(), _packetSize); @@ -85,6 +87,8 @@ Packet::Packet(Packet&& other) { } Packet& Packet::operator=(Packet&& other) { + _type = other._type; + _packetSize = other._packetSize; _packet = std::move(other._packet);