diff --git a/GUI/host/host.cpp b/GUI/host/host.cpp index deb8748..7f5c455 100644 --- a/GUI/host/host.cpp +++ b/GUI/host/host.cpp @@ -191,7 +191,7 @@ namespace Host void DetachProcess(DWORD processId) { - processRecordsByIds->at(processId).Send(HostCommandType(HOST_COMMAND_DETACH)); + processRecordsByIds->at(processId).Send(HOST_COMMAND_DETACH); } void InsertHook(DWORD processId, HookParam hp) diff --git a/extensions/regexfilter.cpp b/extensions/regexfilter.cpp index 59683d9..ce28900 100644 --- a/extensions/regexfilter.cpp +++ b/extensions/regexfilter.cpp @@ -64,7 +64,7 @@ BOOL WINAPI DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo) { std::shared_lock l(m); - if (window == nullptr || sentenceInfo["text number"] == 0) return false; + if (sentenceInfo["text number"] == 0) return false; sentence = std::regex_replace(sentence, regex, L""); return true; } diff --git a/include/types.h b/include/types.h index e17420a..1763eea 100644 --- a/include/types.h +++ b/include/types.h @@ -61,20 +61,20 @@ struct ThreadParam struct InsertHookCmd // From host { InsertHookCmd(HookParam hp) : hp(hp) {} - int command = HOST_COMMAND_NEW_HOOK; + HostCommandType command = HOST_COMMAND_NEW_HOOK; HookParam hp; }; struct ConsoleOutputNotif // From hook { ConsoleOutputNotif(std::string message = "") { strncpy_s(this->message, message.c_str(), MESSAGE_SIZE - 1); } - int command = HOST_NOTIFICATION_TEXT; + HostNotificationType command = HOST_NOTIFICATION_TEXT; char message[MESSAGE_SIZE] = {}; }; struct HookRemovedNotif // From hook { HookRemovedNotif(uint64_t address) : address(address) {}; - int command = HOST_NOTIFICATION_RMVHOOK; + HostNotificationType command = HOST_NOTIFICATION_RMVHOOK; uint64_t address; };