diff options
author | Paramat <paramat@users.noreply.github.com> | 2019-03-18 10:19:53 +0000 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2019-03-18 11:19:53 +0100 |
commit | c0fb5dd3179a0cf70457f5948c0aaca69cbf4c0c (patch) | |
tree | c3ba5494372673171613edcb9981d806d366b122 /src | |
parent | 77cfc4fcd1d10d088e8a56e38bc195a5d6fe5e57 (diff) | |
download | minetest-c0fb5dd3179a0cf70457f5948c0aaca69cbf4c0c.tar.gz minetest-c0fb5dd3179a0cf70457f5948c0aaca69cbf4c0c.tar.bz2 minetest-c0fb5dd3179a0cf70457f5948c0aaca69cbf4c0c.zip |
num_emerge_threads: Initialise value to cope with setting syntax error (#8396)
Diffstat (limited to 'src')
-rw-r--r-- | src/emerge.cpp | 6 |
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) |