From e126e4c4f3cd4b57a5e5d727f9bf14caa112a545 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Thu, 4 Oct 2018 23:31:26 -0400 Subject: [PATCH] use size of hashtable instead of total threads created for thread cap --- GUI/host/host.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GUI/host/host.cc b/GUI/host/host.cc index 3056fcf..80410a3 100644 --- a/GUI/host/host.cc +++ b/GUI/host/host.cc @@ -35,7 +35,7 @@ namespace LOCK(hostMutex); TextThread *it; if ((it = textThreadsByParams[tp]) == nullptr) - if (TextThread::ThreadCounter < MAX_THREAD_COUNT) + if (textThreadsByParams.size() < MAX_THREAD_COUNT) OnCreate(it = textThreadsByParams[tp] = new TextThread(tp, Host::GetHookParam(tp).type)); else return Host::AddConsoleOutput(L"too many text threads: stopping"); it->AddText(text, len);