summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjfhumann <j.f.humann@gmail.com>2014-04-25 23:39:10 +0200
committerjfhumann <j.f.humann@gmail.com>2014-04-25 23:39:10 +0200
commit03402efc499e3167f3762d4a85c24178d8cf5252 (patch)
tree0bbdb1cb7944a94ea7ea3d81bcde97b4a1a6aa6e /src
parentMerge pull request #909 from jfhumann/fixes (diff)
downloadcuberite-03402efc499e3167f3762d4a85c24178d8cf5252.tar
cuberite-03402efc499e3167f3762d4a85c24178d8cf5252.tar.gz
cuberite-03402efc499e3167f3762d4a85c24178d8cf5252.tar.bz2
cuberite-03402efc499e3167f3762d4a85c24178d8cf5252.tar.lz
cuberite-03402efc499e3167f3762d4a85c24178d8cf5252.tar.xz
cuberite-03402efc499e3167f3762d4a85c24178d8cf5252.tar.zst
cuberite-03402efc499e3167f3762d4a85c24178d8cf5252.zip
Diffstat (limited to 'src')
-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++)