mirror of
https://github.com/minetest/minetest.git
synced 2024-12-24 15:12:23 +01:00
Noise: Correct noise objects created with invalid dimensions
This commit is contained in:
parent
386d695330
commit
687d969c9c
@ -485,6 +485,13 @@ Noise::~Noise()
|
|||||||
|
|
||||||
void Noise::allocBuffers()
|
void Noise::allocBuffers()
|
||||||
{
|
{
|
||||||
|
if (sx < 1)
|
||||||
|
sx = 1;
|
||||||
|
if (sy < 1)
|
||||||
|
sy = 1;
|
||||||
|
if (sz < 1)
|
||||||
|
sz = 1;
|
||||||
|
|
||||||
this->noise_buf = NULL;
|
this->noise_buf = NULL;
|
||||||
resizeNoiseBuf(sz > 1);
|
resizeNoiseBuf(sz > 1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user