forked from mirrors/kolyah35-minecraft-pe-0.6.1
FIX: memset ._.
This commit is contained in:
parent
5bc19c4ab2
commit
5e19ef778e
1 changed files with 3 additions and 1 deletions
|
|
@ -26,6 +26,8 @@ public:
|
|||
emptyChunk = new EmptyLevelChunk(level_, NULL, 0, 0);
|
||||
|
||||
chunks = new LevelChunk *[LevelConstants::CHUNK_CACHE_WIDTH * LevelConstants::CHUNK_CACHE_WIDTH];
|
||||
memset(chunks, 0, sizeof(LevelChunk*) * LevelConstants::CHUNK_CACHE_WIDTH * LevelConstants::CHUNK_CACHE_WIDTH);
|
||||
LOGI("Chunks allocated.");
|
||||
}
|
||||
|
||||
~ChunkCache() {
|
||||
|
|
@ -34,7 +36,7 @@ public:
|
|||
|
||||
for (int i = 0; i < LevelConstants::CHUNK_CACHE_WIDTH * LevelConstants::CHUNK_CACHE_WIDTH; i++)
|
||||
{
|
||||
if (&chunks[i])
|
||||
if (chunks[i])
|
||||
{
|
||||
chunks[i]->deleteBlockData();
|
||||
delete chunks[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue