Fixed a memory corruption issue in Packet.cpp