mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Don't write over memory limit...
This commit is contained in:
parent
7b2578b517
commit
da778f4e66
|
@ -183,6 +183,9 @@ void CDemoRecorder::Write(int Type, const void *pData, int Size)
|
|||
if(!m_File)
|
||||
return;
|
||||
|
||||
if(Size > 64*1024)
|
||||
return;
|
||||
|
||||
/* pad the data with 0 so we get an alignment of 4,
|
||||
else the compression won't work and miss some bytes */
|
||||
mem_copy(aBuffer2, pData, Size);
|
||||
|
|
Loading…
Reference in a new issue