hopefully final?

This commit is contained in:
KingKDot
2026-03-12 00:29:25 -05:00
parent cfa45fb56b
commit c72cba093c
5 changed files with 69 additions and 14 deletions
+4 -1
View File
@@ -47,8 +47,11 @@ RDI_NOINLINE ULONG_PTR caller(VOID)
{
#ifdef _MSC_VER
return (ULONG_PTR)_ReturnAddress();
#elif defined(__GNUC__) || defined(__clang__)
// For MinGW/Clang, use GCC builtins and extract helper for target-specific safety.
return (ULONG_PTR)__builtin_extract_return_addr(__builtin_return_address(0));
#else
return (ULONG_PTR)__builtin_return_address(0);
return 0;
#endif
}
//===============================================================================================//