From d26a5fe43f37de71e958db591d656eb0ee3e237b Mon Sep 17 00:00:00 2001 From: Caball Date: Tue, 31 Dec 2024 00:17:24 +0100 Subject: [PATCH] Added a few changes. Added missing includes to the list of standard headers. Added an assertion to the asmjit assemble function to get an early warning if asmjit fails silently. --- src/client/component/dedicated_info.cpp | 2 +- src/client/std_include.hpp | 4 ++++ src/common/utils/hook.cpp | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/client/component/dedicated_info.cpp b/src/client/component/dedicated_info.cpp index de3f8aa..a505924 100644 --- a/src/client/component/dedicated_info.cpp +++ b/src/client/component/dedicated_info.cpp @@ -59,7 +59,7 @@ namespace dedicated_info utils::string::strip(sv_hostname->current.string, cleaned_hostname.data(), cleaned_hostname.size() + 1); - console::set_title(utils::string::va("%s on %s [%d/%d] (%d)", cleaned_hostname.data(), + console::set_title(utils::string::va("%s on %s [%d/%d] (%d)", cleaned_hostname.c_str(), mapname->current.string, client_count, sv_maxclients->current.integer, bot_count)); }, scheduler::pipeline::main, 1s); diff --git a/src/client/std_include.hpp b/src/client/std_include.hpp index 3f7c182..b2c2d33 100644 --- a/src/client/std_include.hpp +++ b/src/client/std_include.hpp @@ -46,7 +46,10 @@ #undef min #endif +#include +#include #include +#include #include #include #include @@ -54,6 +57,7 @@ #include #include #include +#include #include #include #include diff --git a/src/common/utils/hook.cpp b/src/common/utils/hook.cpp index be05cb9..f25821e 100644 --- a/src/common/utils/hook.cpp +++ b/src/common/utils/hook.cpp @@ -2,6 +2,7 @@ #include "string.hpp" #include +#include namespace utils::hook { @@ -279,6 +280,7 @@ namespace utils::hook void* result = nullptr; runtime.add(&result, &code); + assert(result); return result; }