mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Noise: Correct noise objects created with invalid dimensions
This commit is contained in:
@@ -485,6 +485,13 @@ Noise::~Noise()
|
||||
|
||||
void Noise::allocBuffers()
|
||||
{
|
||||
if (sx < 1)
|
||||
sx = 1;
|
||||
if (sy < 1)
|
||||
sy = 1;
|
||||
if (sz < 1)
|
||||
sz = 1;
|
||||
|
||||
this->noise_buf = NULL;
|
||||
resizeNoiseBuf(sz > 1);
|
||||
|
||||
|
Reference in New Issue
Block a user