diff options
author | Craig Robbins <kde.psych@gmail.com> | 2015-03-10 18:46:28 +1000 |
---|---|---|
committer | Craig Robbins <kde.psych@gmail.com> | 2015-03-10 18:46:28 +1000 |
commit | d4e210ee95430e6e8309e009fe7f0a70ca2dd606 (patch) | |
tree | b9ef1472fdf1db0d33304e1a3ae1a415d95d70a7 /src | |
parent | e74b8da54e4443773404f2642916fd2f2b7f625e (diff) | |
download | minetest-d4e210ee95430e6e8309e009fe7f0a70ca2dd606.tar.gz minetest-d4e210ee95430e6e8309e009fe7f0a70ca2dd606.tar.bz2 minetest-d4e210ee95430e6e8309e009fe7f0a70ca2dd606.zip |
Ensure that heightmap is initialized before use
Without this, cavegen will use values in the heightmap before they are initialized.
Diffstat (limited to 'src')
-rw-r--r-- | src/mapgen_v6.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mapgen_v6.cpp b/src/mapgen_v6.cpp index 7f5be27ae..d4b9201d9 100644 --- a/src/mapgen_v6.cpp +++ b/src/mapgen_v6.cpp @@ -56,6 +56,7 @@ MapgenV6::MapgenV6(int mapgenid, MapgenParams *params, EmergeManager *emerge) this->ystride = csize.X; //////fix this this->heightmap = new s16[csize.X * csize.Z]; + memset(this->heightmap, 0, csize.X * csize.Z * sizeof(*this->heightmap)); MapgenV6Params *sp = (MapgenV6Params *)params->sparams; this->spflags = sp->spflags; |