diff --git a/r5dev/thirdparty/detours/include/detours.h b/r5dev/thirdparty/detours/include/detours.h index 4b9e2328..2f12f73c 100644 --- a/r5dev/thirdparty/detours/include/detours.h +++ b/r5dev/thirdparty/detours/include/detours.h @@ -882,9 +882,12 @@ template< LONG DetourAttach(_Inout_ T *ppPointer, _In_ T pDetour) noexcept { - return DetourAttach( + LONG result = DetourAttach( reinterpret_cast(ppPointer), reinterpret_cast(pDetour)); + + assert(result == NO_ERROR); + return result; } template< @@ -896,12 +899,15 @@ LONG DetourAttachEx(_Inout_ T *ppPointer, _Out_opt_ T *ppRealTarget, _Out_opt_ T *ppRealDetour) noexcept { - return DetourAttachEx( + LONG result = DetourAttachEx( reinterpret_cast(ppPointer), reinterpret_cast(pDetour), ppRealTrampoline, reinterpret_cast(ppRealTarget), reinterpret_cast(ppRealDetour)); + + assert(result == NO_ERROR); + return result; } template< @@ -910,9 +916,12 @@ template< LONG DetourDetach(_Inout_ T *ppPointer, _In_ T pDetour) noexcept { - return DetourDetach( + LONG result = DetourDetach( reinterpret_cast(ppPointer), reinterpret_cast(pDetour)); + + assert(result == NO_ERROR); + return result; } #endif // __cplusplus >= 201103L || _MSVC_LANG >= 201103L