From a7a3379050fc6399f6039cb772d28f05e54586a8 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Thu, 19 Jul 2018 13:34:26 -0400 Subject: [PATCH] minor fixes --- vnr/texthook/hookman.cc | 9 +++------ vnr/texthook/hookman.h | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/vnr/texthook/hookman.cc b/vnr/texthook/hookman.cc index 13dd418..63d1f67 100644 --- a/vnr/texthook/hookman.cc +++ b/vnr/texthook/hookman.cc @@ -141,12 +141,9 @@ void HookManager::DispatchText(DWORD pid, DWORD hook, DWORD retn, DWORD spl, con void HookManager::AddConsoleOutput(LPCWSTR text) { HM_LOCK; - if (text) - { - int len = wcslen(text) * 2; - TextThread *console = textThreadsByParams[{ 0, -1UL, -1UL, -1UL }]; - console->AddSentence(std::wstring(text)); - } + int len = wcslen(text) * 2; + TextThread *console = textThreadsByParams[{ 0, -1UL, -1UL, -1UL }]; + console->AddSentence(std::wstring(text)); } void HookManager::ClearCurrent() diff --git a/vnr/texthook/hookman.h b/vnr/texthook/hookman.h index b691d74..d6929b9 100644 --- a/vnr/texthook/hookman.h +++ b/vnr/texthook/hookman.h @@ -30,6 +30,7 @@ struct ThreadParameterHasher } }; +// Artikash 7/19/2018: This should probably be broken up into 2-4 classes... class __declspec(dllexport) HookManager { public: