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/emerge.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/emerge.cpp')
-rw-r--r-- | src/emerge.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emerge.cpp b/src/emerge.cpp index 5c1569f04..e36d36448 100644 --- a/src/emerge.cpp +++ b/src/emerge.cpp @@ -173,7 +173,7 @@ EmergeManager::EmergeManager(Server *server, MetricsBackend *mb) g_settings->getS16NoEx("num_emerge_threads", nthreads); // If automatic, leave a proc for the main thread and one for // some other misc thread - if (nthreads == 0) + if (nthreads <= 0) nthreads = Thread::getNumberOfProcessors() - 2; if (nthreads < 1) nthreads = 1; |