From 1ae0335b626e1c9f31cbaf45509099e4676f2d1a Mon Sep 17 00:00:00 2001 From: Paramat Date: Mon, 18 Mar 2019 10:19:53 +0000 Subject: num_emerge_threads: Initialise value to cope with setting syntax error (#8396) --- src/emerge.cpp | 6 +++--- 1 file 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) -- cgit v1.2.3