diff --git a/src/network/networkpacket.cpp b/src/network/networkpacket.cpp index b5e451cd..2b308f33 100644 --- a/src/network/networkpacket.cpp +++ b/src/network/networkpacket.cpp @@ -77,6 +77,9 @@ void NetworkPacket::putRawString(const char* src, u32 len) m_data.resize(m_datasize); } + if (m_datasize == 0) + return; + memcpy(&m_data[m_read_offset], src, len); m_read_offset += len; }