diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-05-08 15:31:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-08 15:31:02 +0100 |
| commit | b94f1498542be0e83fe8060a50bce5ff2d5a1c39 (patch) | |
| tree | 8bddcfc9f8504817d5778136ec8c7c05d881c852 /src/plugins/HookSystem.cpp | |
| parent | a6a0cc308c827557d04cb3e4c3b5d258de0411e6 (diff) | |
config: allow hashes for parsing colors (#14337)
Diffstat (limited to 'src/plugins/HookSystem.cpp')
| -rw-r--r-- | src/plugins/HookSystem.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/HookSystem.cpp b/src/plugins/HookSystem.cpp index f17a4556..15ae0f50 100644 --- a/src/plugins/HookSystem.cpp +++ b/src/plugins/HookSystem.cpp @@ -14,6 +14,10 @@ #include <sys/stat.h> #include <sys/types.h> +#include <hyprutils/string/Numeric.hpp> + +using namespace Hyprutils::String; + CFunctionHook::CFunctionHook(HANDLE owner, void* source, void* destination) : m_source(source), m_destination(destination), m_owner(owner) { ; } @@ -92,7 +96,7 @@ CFunctionHook::SAssembly CFunctionHook::fixInstructionProbeRIPCalls(const SInstr size_t plusPresent = tokens[1][0] == '+' ? 1 : 0; size_t minusPresent = tokens[1][0] == '-' ? 1 : 0; std::string addr = tokens[1].substr((plusPresent || minusPresent), tokens[1].find("(%rip)") - (plusPresent || minusPresent)); - auto addrResult = configStringToInt(addr); + auto addrResult = strToNumber<int64_t>(addr); if (!addrResult) return {}; const int32_t OFFSET = (minusPresent ? -1 : 1) * *addrResult; |
