From 051181fa6ee00d8379e8a7dc7442b58342d4352b Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sat, 9 Jul 2022 22:32:08 +0200 Subject: Enforce limits of settings that could cause buggy behaviour (#12450) Enforces the setting value bounds that are currently only limited by the GUI (settingtypes.txt). --- src/emerge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/emerge.cpp') diff --git a/src/emerge.cpp b/src/emerge.cpp index 5c1569f04..e36d36448 100644 --- a/src/emerge.cpp +++ b/src/emerge.cpp @@ -173,7 +173,7 @@ EmergeManager::EmergeManager(Server *server, MetricsBackend *mb) 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) + if (nthreads <= 0) nthreads = Thread::getNumberOfProcessors() - 2; if (nthreads < 1) nthreads = 1; -- cgit v1.2.3