From 9278bb732d115251776b12ebb45d0192c7fdd916 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 11 May 2014 15:52:02 +0100 Subject: Fixed a bug in writting zeros to a non-allocated section --- src/ChunkBuffer.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/ChunkBuffer.cpp') diff --git a/src/ChunkBuffer.cpp b/src/ChunkBuffer.cpp index baeeff890..96077b966 100644 --- a/src/ChunkBuffer.cpp +++ b/src/ChunkBuffer.cpp @@ -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)); +} + + + + -- cgit v1.2.3