aboutsummaryrefslogtreecommitdiff
path: root/src/emerge.cpp
diff options
context:
space:
mode:
authorParamat <paramat@users.noreply.github.com>2019-03-18 10:19:53 +0000
committerrubenwardy <rw@rubenwardy.com>2019-03-19 02:18:26 +0000
commit1ae0335b626e1c9f31cbaf45509099e4676f2d1a (patch)
tree25e124aed102266246ddb15755f1c0a722d90e50 /src/emerge.cpp
parentca1bff6b66c4df8bd42f1249523cf235e275e265 (diff)
downloadminetest-1ae0335b626e1c9f31cbaf45509099e4676f2d1a.tar.gz
minetest-1ae0335b626e1c9f31cbaf45509099e4676f2d1a.tar.bz2
minetest-1ae0335b626e1c9f31cbaf45509099e4676f2d1a.zip
num_emerge_threads: Initialise value to cope with setting syntax error (#8396)
Diffstat (limited to 'src/emerge.cpp')
-rw-r--r--src/emerge.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emerge.cpp b/src/emerge.cpp
index 0ad6ee29b..0a1852985 100644
--- a/src/emerge.cpp
+++ b/src/emerge.cpp
@@ -128,10 +128,10 @@ EmergeManager::EmergeManager(Server *server)
enable_mapgen_debug_info = g_settings->getBool("enable_mapgen_debug_info");
- // If unspecified, leave a proc for the main thread and one for
- // some other misc thread
- s16 nthreads;
+ s16 nthreads = 1;
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)
nthreads = Thread::getNumberOfProcessors() - 2;
if (nthreads < 1)