From 4ca2bc3abb23db7ecc2cd34c500fe2e5c59c0327 Mon Sep 17 00:00:00 2001 From: Mikusch <25514044+Mikusch@users.noreply.github.com> Date: Thu, 25 Jun 2026 09:07:58 +0200 Subject: [PATCH] Fix std::max build break --- include/khook.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/khook.hpp b/include/khook.hpp index 133907c..5c5be05 100644 --- a/include/khook.hpp +++ b/include/khook.hpp @@ -9,6 +9,7 @@ */ #pragma once +#include #include #include #include @@ -95,10 +96,10 @@ class Hook : public __Hook { #else std::uint32_t return_size = 0; if constexpr(!std::is_void_v) { - return_size = std::max(sizeof(void*), sizeof(RETURN)); + return_size = (std::max)(sizeof(void*), sizeof(RETURN)); } - return return_size + (std::max(sizeof(void*), sizeof(ARGS)) + ... + 0); + return return_size + ((std::max)(sizeof(void*), sizeof(ARGS)) + ... + 0); #endif } protected: