mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 17:15:21 +02:00
LuaPerlinNoiseMap: Prevent invalid memory access when attempting to generate 3d noise with a buffer created for 2d
This commit is contained in:
@@ -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[];
|
||||
|
||||
|
Reference in New Issue
Block a user