1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

LuaPerlinNoiseMap: Prevent invalid memory access when attempting to generate 3d noise with a buffer created for 2d

This commit is contained in:
kwolekr 2014-12-12 02:46:52 -05:00
parent 00fc0babe0
commit 4e5d17f666
2 changed files with 12 additions and 16 deletions

View file

@ -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[];