summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-04-27 22:12:36 +0200
committerTycho <work.tycho+git@gmail.com>2014-04-27 22:12:36 +0200
commita2b1fa6520355e9f073fcb44897c6ee21a69df75 (patch)
tree4b81375946a568509d482675587cd17daf8708e7 /src
parentRemoved unneeded assert (diff)
downloadcuberite-a2b1fa6520355e9f073fcb44897c6ee21a69df75.tar
cuberite-a2b1fa6520355e9f073fcb44897c6ee21a69df75.tar.gz
cuberite-a2b1fa6520355e9f073fcb44897c6ee21a69df75.tar.bz2
cuberite-a2b1fa6520355e9f073fcb44897c6ee21a69df75.tar.lz
cuberite-a2b1fa6520355e9f073fcb44897c6ee21a69df75.tar.xz
cuberite-a2b1fa6520355e9f073fcb44897c6ee21a69df75.tar.zst
cuberite-a2b1fa6520355e9f073fcb44897c6ee21a69df75.zip
Diffstat (limited to '')
-rw-r--r--src/BlockArea.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp
index 40cca8882..49c564ca5 100644
--- a/src/BlockArea.cpp
+++ b/src/BlockArea.cpp
@@ -663,8 +663,12 @@ void cBlockArea::Merge(const cBlockArea & a_Src, int a_RelX, int a_RelY, int a_R
if (IsDummyMetas)
{
- SrcMetas = new NIBBLETYPE[a_Src.GetBlockCount()];
- DstMetas = new NIBBLETYPE[GetBlockCount()];
+ size_t SrcCount = a_Src.GetBlockCount();
+ size_t DestCount = GetBlockCount();
+ SrcMetas = new NIBBLETYPE[SrcCount];
+ DstMetas = new NIBBLETYPE[DestCount];
+ memset(SrcMetas, 0, SrcCount);
+ memset(DstMetas, 0, DestCount);
}
switch (a_Strategy)