aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/network/networkpacket.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/networkpacket.cpp b/src/network/networkpacket.cpp
index b5e451cdb..2b308f334 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;
}