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:
parent
3ee854cf25
commit
2923eafaca
2 changed files with 7 additions and 19 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue