From 000232a55d838cddb43ce8c21979d1b61b71f19f Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 15 Jul 2015 17:59:37 -0700 Subject: [PATCH] fix copied packet buffer creation --- libraries/networking/src/udt/Packet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/networking/src/udt/Packet.cpp b/libraries/networking/src/udt/Packet.cpp index 56c5a1c389..0a174a2820 100644 --- a/libraries/networking/src/udt/Packet.cpp +++ b/libraries/networking/src/udt/Packet.cpp @@ -106,7 +106,7 @@ Packet& Packet::operator=(const Packet& other) { _type = other._type; _packetSize = other._packetSize; - _packet = std::unique_ptr(new char(_packetSize)); + _packet = std::unique_ptr(new char[_packetSize]); memcpy(_packet.get(), other._packet.get(), _packetSize); _payloadStart = _packet.get() + (other._payloadStart - other._packet.get());