summaryrefslogtreecommitdiffstats
path: root/src/Noise.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-04-27 17:00:37 +0200
committerMattes D <github@xoft.cz>2014-04-27 17:00:37 +0200
commita0f6149d0551c532896db2b920333718f68888d8 (patch)
tree27826e519c342e395e535190201a47e4a65e74e0 /src/Noise.cpp
parentMerge pull request #941 from archshift/master (diff)
parentFixed unitialized member in gZipFile (CID 43673) (diff)
downloadcuberite-a0f6149d0551c532896db2b920333718f68888d8.tar
cuberite-a0f6149d0551c532896db2b920333718f68888d8.tar.gz
cuberite-a0f6149d0551c532896db2b920333718f68888d8.tar.bz2
cuberite-a0f6149d0551c532896db2b920333718f68888d8.tar.lz
cuberite-a0f6149d0551c532896db2b920333718f68888d8.tar.xz
cuberite-a0f6149d0551c532896db2b920333718f68888d8.tar.zst
cuberite-a0f6149d0551c532896db2b920333718f68888d8.zip
Diffstat (limited to '')
-rw-r--r--src/Noise.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Noise.cpp b/src/Noise.cpp
index efbb128c3..95a022ea3 100644
--- a/src/Noise.cpp
+++ b/src/Noise.cpp
@@ -744,6 +744,8 @@ void cCubicNoise::CalcFloorFrac(
int * a_Same, int & a_NumSame
) const
{
+ ASSERT(a_Size > 0);
+
NOISE_DATATYPE val = a_Start;
NOISE_DATATYPE dif = (a_End - a_Start) / (a_Size - 1);
for (int i = 0; i < a_Size; i++)