aboutsummaryrefslogtreecommitdiff
path: root/src/network/networkpacket.h
diff options
context:
space:
mode:
authorJay Arndt <jayarn27182@windstream.net>2015-05-04 04:53:41 -0500
committerest31 <MTest31@outlook.com>2015-05-05 01:47:41 +0200
commit2923eafaca929e129ba81504676d3770cff5f681 (patch)
treeb13ec22f08639fce6e93c40947a81ac2f8b07e8d /src/network/networkpacket.h
parent3ee854cf25c846e535857281fea0e5d1541cb212 (diff)
downloadminetest-2923eafaca929e129ba81504676d3770cff5f681.tar.gz
minetest-2923eafaca929e129ba81504676d3770cff5f681.tar.bz2
minetest-2923eafaca929e129ba81504676d3770cff5f681.zip
Stop NetworkPacket methods from producing bloated packets
Diffstat (limited to 'src/network/networkpacket.h')
-rw-r--r--src/network/networkpacket.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/networkpacket.h b/src/network/networkpacket.h
index 9ad169888..0d2015e7f 100644
--- a/src/network/networkpacket.h
+++ b/src/network/networkpacket.h
@@ -114,7 +114,7 @@ private:
template<typename T> void checkDataSize()
{
if (m_read_offset + sizeof(T) > m_datasize) {
- m_datasize += sizeof(T);
+ m_datasize = m_read_offset + sizeof(T);
m_data.resize(m_datasize);
}
}