1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

Stop NetworkPacket methods from producing bloated packets

This commit is contained in:
Jay Arndt 2015-05-04 04:53:41 -05:00 committed by est31
parent 3ee854cf25
commit 2923eafaca
2 changed files with 7 additions and 19 deletions

View file

@ -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);
}
}