From 45fa2d98db72bd8443dae7727f74ebc9fdf2f5d2 Mon Sep 17 00:00:00 2001 From: worktycho Date: Tue, 10 Mar 2015 20:32:01 +0000 Subject: Fixed Bug in cChunkData. FIxed a bug where if the index was not aligned with the sections empty sections would not be set in the correct location. --- src/ChunkData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChunkData.cpp b/src/ChunkData.cpp index 57b27c5e0..80f40d39e 100644 --- a/src/ChunkData.cpp +++ b/src/ChunkData.cpp @@ -361,7 +361,7 @@ void cChunkData::CopyBlockTypes(BLOCKTYPE * a_Dest, size_t a_Idx, size_t a_Lengt } else { - memset(&a_Dest[(i * SectionBlockCount) - a_Idx], 0, sizeof(BLOCKTYPE) * ToCopy); + memset(&a_Dest[(i * SectionBlockCount) + StartPos - a_Idx], 0, sizeof(BLOCKTYPE) * ToCopy); } } } -- cgit v1.2.3