From: gregorycu Date: Mon, 4 Jan 2016 05:15:50 +0000 (+1100) Subject: Fix for commit 87dcee6 It uses the wrong variable and only covers some use cases... X-Git-Tag: 0.4.14~344 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e7e9171f37730c34dd687aa2b9ca5392aa41e46b;p=oweals%2Fminetest.git Fix for commit 87dcee6 It uses the wrong variable and only covers some use cases. This change covers all use cases. --- diff --git a/src/network/networkpacket.cpp b/src/network/networkpacket.cpp index 2b308f334..388afc18e 100644 --- a/src/network/networkpacket.cpp +++ b/src/network/networkpacket.cpp @@ -77,7 +77,7 @@ void NetworkPacket::putRawString(const char* src, u32 len) m_data.resize(m_datasize); } - if (m_datasize == 0) + if (len == 0) return; memcpy(&m_data[m_read_offset], src, len);