From 035e6bfc18f4e319d5cde2f85c5c72a87294d75b Mon Sep 17 00:00:00 2001 From: kwolekr Date: Fri, 12 Dec 2014 22:58:19 -0500 Subject: [PATCH] LuaPerlinNoiseMap: Fix 3d noise safety check --- src/script/lua_api/l_noise.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/lua_api/l_noise.cpp b/src/script/lua_api/l_noise.cpp index a9b59791f..5a82b6485 100644 --- a/src/script/lua_api/l_noise.cpp +++ b/src/script/lua_api/l_noise.cpp @@ -253,7 +253,7 @@ int LuaPerlinNoiseMap::l_get3dMap_flat(lua_State *L) LuaPerlinNoiseMap::LuaPerlinNoiseMap(NoiseParams *params, int seed, v3s16 size) { - m_is3d = size.Z <= 1; + m_is3d = size.Z > 1; np = *params; try { noise = new Noise(&np, seed, size.X, size.Y, size.Z);