diff options
author | kwolekr <kwolekr@minetest.net> | 2014-12-12 02:46:52 -0500 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2014-12-12 02:46:52 -0500 |
commit | 4e5d17f666c1321aa47fad8d315a73f64ff8ca4b (patch) | |
tree | 329a3af72a68442149c4597de77c61e6273261b9 /src/script/lua_api/l_noise.h | |
parent | 00fc0babe0c6c5464fa9ffbc5a257b1e2aa93111 (diff) | |
download | minetest-4e5d17f666c1321aa47fad8d315a73f64ff8ca4b.tar.gz minetest-4e5d17f666c1321aa47fad8d315a73f64ff8ca4b.tar.bz2 minetest-4e5d17f666c1321aa47fad8d315a73f64ff8ca4b.zip |
LuaPerlinNoiseMap: Prevent invalid memory access when attempting to generate 3d noise with a buffer created for 2d
Diffstat (limited to 'src/script/lua_api/l_noise.h')
-rw-r--r-- | src/script/lua_api/l_noise.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/lua_api/l_noise.h b/src/script/lua_api/l_noise.h index 6e3029aef..3e22ac7a0 100644 --- a/src/script/lua_api/l_noise.h +++ b/src/script/lua_api/l_noise.h @@ -30,7 +30,6 @@ with this program; if not, write to the Free Software Foundation, Inc., class LuaPerlinNoise : public ModApiBase { private: NoiseParams np; - static const char className[]; static const luaL_reg methods[]; @@ -59,8 +58,9 @@ public: LuaPerlinNoiseMap */ class LuaPerlinNoiseMap : public ModApiBase { - NoiseParams m_noise_params; + NoiseParams np; Noise *noise; + bool m_is3d; static const char className[]; static const luaL_reg methods[]; |