1
0

Fixed a bug in writting zeros to a non-allocated section

This commit is contained in:
Tycho
2014-05-11 15:52:02 +01:00
parent 009f749962
commit 9278bb732d
3 changed files with 134 additions and 93 deletions

View File

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