summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/BlockArea.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp
index 49c564ca5..e4b122fa2 100644
--- a/src/BlockArea.cpp
+++ b/src/BlockArea.cpp
@@ -665,9 +665,10 @@ void cBlockArea::Merge(const cBlockArea & a_Src, int a_RelX, int a_RelY, int a_R
{
size_t SrcCount = a_Src.GetBlockCount();
size_t DestCount = GetBlockCount();
- SrcMetas = new NIBBLETYPE[SrcCount];
+ NIBBLETYPE * tempSrcMetas = new NIBBLETYPE[SrcCount];
+ memset(tempSrcMetas, 0, SrcCount);
+ SrcMetas = tempSrcMetas;
DstMetas = new NIBBLETYPE[DestCount];
- memset(SrcMetas, 0, SrcCount);
memset(DstMetas, 0, DestCount);
}