From 816122546bf25bbea4ce52c75f30991f79b893fa Mon Sep 17 00:00:00 2001 From: AltoXorg <56553686+Alto1772@users.noreply.github.com> Date: Sat, 10 Dec 2022 16:08:37 +0800 Subject: [PATCH] [Fix] ZAPD: Fix 1-core cpu machines in OTR generation tool (#2130) --- ZAPDTR/ZAPD/Main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZAPDTR/ZAPD/Main.cpp b/ZAPDTR/ZAPD/Main.cpp index 2f1d5be17..d596d0545 100644 --- a/ZAPDTR/ZAPD/Main.cpp +++ b/ZAPDTR/ZAPD/Main.cpp @@ -328,7 +328,7 @@ int main(int argc, char* argv[]) Directory::ListFiles(Globals::Instance->inputPath.string()); const int num_threads = std::thread::hardware_concurrency(); - ctpl::thread_pool pool(num_threads / 2); + ctpl::thread_pool pool(num_threads > 1 ? num_threads / 2 : 1); bool parseSuccessful;