Core/PacketIO: increased allowed storage size of ByteBuffer from ~10mb to ~100mb and fixed a logic mistake that was allowing first-time append calls to bypass that size limit (#30037)

This commit is contained in:
Ovahlord
2024-06-15 18:12:18 +02:00
committed by GitHub
parent dd61ba2844
commit a3db80ce58

View File

@@ -89,7 +89,7 @@ void ByteBuffer::append(uint8 const* src, size_t cnt)
{
ASSERT(src, "Attempted to put a NULL-pointer in ByteBuffer (pos: " SZFMTD " size: " SZFMTD ")", _wpos, size());
ASSERT(cnt, "Attempted to put a zero-sized value in ByteBuffer (pos: " SZFMTD " size: " SZFMTD ")", _wpos, size());
ASSERT(size() < 10000000);
ASSERT((size() + cnt) < 100000000);
FlushBits();