Skip to content

Commit c0fb5dd

Browse files
paramatnerzhul
authored andcommittedMar 18, 2019
num_emerge_threads: Initialise value to cope with setting syntax error (#8396)
1 parent 77cfc4f commit c0fb5dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

Diff for: ‎src/emerge.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ EmergeManager::EmergeManager(Server *server)
128128

129129
enable_mapgen_debug_info = g_settings->getBool("enable_mapgen_debug_info");
130130

131-
// If unspecified, leave a proc for the main thread and one for
132-
// some other misc thread
133-
s16 nthreads;
131+
s16 nthreads = 1;
134132
g_settings->getS16NoEx("num_emerge_threads", nthreads);
133+
// If automatic, leave a proc for the main thread and one for
134+
// some other misc thread
135135
if (nthreads == 0)
136136
nthreads = Thread::getNumberOfProcessors() - 2;
137137
if (nthreads < 1)

0 commit comments

Comments
 (0)
Please sign in to comment.