diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2022-07-09 22:32:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-09 22:32:08 +0200 |
commit | 051181fa6ee00d8379e8a7dc7442b58342d4352b (patch) | |
tree | 58ad84f05310024b311c533684defdbeb5ee3e84 /src/mapgen/mapgen_fractal.cpp | |
parent | 7c261118e06c630ea9ad00f20d7005b8edc108dd (diff) | |
download | minetest-051181fa6ee00d8379e8a7dc7442b58342d4352b.tar.gz minetest-051181fa6ee00d8379e8a7dc7442b58342d4352b.tar.bz2 minetest-051181fa6ee00d8379e8a7dc7442b58342d4352b.zip |
Enforce limits of settings that could cause buggy behaviour (#12450)
Enforces the setting value bounds that are currently only limited by the GUI (settingtypes.txt).
Diffstat (limited to 'src/mapgen/mapgen_fractal.cpp')
-rw-r--r-- | src/mapgen/mapgen_fractal.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mapgen/mapgen_fractal.cpp b/src/mapgen/mapgen_fractal.cpp index fabb1b2b1..c9071cecf 100644 --- a/src/mapgen/mapgen_fractal.cpp +++ b/src/mapgen/mapgen_fractal.cpp @@ -131,6 +131,7 @@ void MapgenFractalParams::readParams(const Settings *settings) settings->getNoiseParams("mgfractal_np_cave1", np_cave1); settings->getNoiseParams("mgfractal_np_cave2", np_cave2); settings->getNoiseParams("mgfractal_np_dungeons", np_dungeons); + iterations = std::max<u16>(iterations, 1); } |