projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
386d695
)
Noise: Correct noise objects created with invalid dimensions
author
kwolekr
<kwolekr@minetest.net>
Mon, 20 Apr 2015 01:39:10 +0000
(21:39 -0400)
committer
kwolekr
<kwolekr@minetest.net>
Mon, 20 Apr 2015 01:39:10 +0000
(21:39 -0400)
src/noise.cpp
patch
|
blob
|
history
diff --git
a/src/noise.cpp
b/src/noise.cpp
index bb7c9969e1574f399fa40ca090e08fa2701a373b..9852a1524612c3b6cd21c1787f82362f3e722efa 100644
(file)
--- a/
src/noise.cpp
+++ b/
src/noise.cpp
@@
-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);