summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-04-27 22:43:59 +0200
committerTycho <work.tycho+git@gmail.com>2014-04-27 22:43:59 +0200
commit744e00c904ebde6c89aa4763f06118635694d396 (patch)
treeb08b9159d33d781dc36045e95109ad1281765ff3 /src
parentFixes to uninitallsed array access in Noise.cpp (diff)
downloadcuberite-744e00c904ebde6c89aa4763f06118635694d396.tar
cuberite-744e00c904ebde6c89aa4763f06118635694d396.tar.gz
cuberite-744e00c904ebde6c89aa4763f06118635694d396.tar.bz2
cuberite-744e00c904ebde6c89aa4763f06118635694d396.tar.lz
cuberite-744e00c904ebde6c89aa4763f06118635694d396.tar.xz
cuberite-744e00c904ebde6c89aa4763f06118635694d396.tar.zst
cuberite-744e00c904ebde6c89aa4763f06118635694d396.zip
Diffstat (limited to '')
-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);
}