From 420746a6ff23047975f5c5b22cb6e12f652e3151 Mon Sep 17 00:00:00 2001 From: iProgramInCpp Date: Mon, 27 May 2024 17:33:42 +0300 Subject: [PATCH] * Fix bad delete when C_MAX_CHUNKS sizes are modified. --- source/world/level/levelgen/chunk/ChunkCache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/world/level/levelgen/chunk/ChunkCache.cpp b/source/world/level/levelgen/chunk/ChunkCache.cpp index 772f71fd..a3ab622f 100644 --- a/source/world/level/levelgen/chunk/ChunkCache.cpp +++ b/source/world/level/levelgen/chunk/ChunkCache.cpp @@ -262,8 +262,8 @@ ChunkCache::~ChunkCache() SAFE_DELETE(m_pChunkSource); SAFE_DELETE(m_pEmptyChunk); - for (int i = 0; i < 16; i++) - for (int j = 0; j < 16; j++) + for (int i = 0; i < C_MAX_CHUNKS_Z; i++) + for (int j = 0; j < C_MAX_CHUNKS_X; j++) { LevelChunk* pChk = m_chunkMap[i][j]; if (pChk)