From c0fb5dd3179a0cf70457f5948c0aaca69cbf4c0c 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(-) (limited to 'src/emerge.cpp') 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