Fixed a bug in writting zeros to a non-allocated section
This commit is contained in:
@@ -295,3 +295,14 @@ void cChunkBuffer::Free(cChunkBuffer::sChunkSection * ptr) const
|
||||
|
||||
|
||||
|
||||
void cChunkBuffer::ZeroSection(cChunkBuffer::sChunkSection * ptr) const
|
||||
{
|
||||
memset(ptr->m_BlockTypes,0x00,sizeof(ptr->m_BlockTypes));
|
||||
memset(ptr->m_BlockMeta,0x00,sizeof(ptr->m_BlockMeta));
|
||||
memset(ptr->m_BlockLight,0x00,sizeof(ptr->m_BlockLight));
|
||||
memset(ptr->m_BlockSkyLight,0x00,sizeof(ptr->m_BlockSkyLight));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user