mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Misc: Fix Windows 32 bits build
Close #25789
(cherry picked from commit 1cafd4ef74)
This commit is contained in:
@@ -564,10 +564,16 @@ PEXCEPTION_POINTERS pExceptionInfo)
|
||||
{
|
||||
PVOID exceptionObject = reinterpret_cast<PVOID>(pExceptionRecord->ExceptionInformation[1]);
|
||||
ThrowInfo const* throwInfo = reinterpret_cast<ThrowInfo const*>(pExceptionRecord->ExceptionInformation[2]);
|
||||
#if _EH_RELATIVE_TYPEINFO
|
||||
// When _EH_RELATIVE_TYPEINFO is defined, the pointers need to be retrieved with some pointer math
|
||||
auto resolveExceptionRVA = [pExceptionRecord](int32 rva) -> DWORD_PTR
|
||||
{
|
||||
return rva + (pExceptionRecord->NumberParameters >= 4 ? pExceptionRecord->ExceptionInformation[3] : 0);
|
||||
};
|
||||
#else
|
||||
// Otherwise the pointers are already there in the API types
|
||||
auto resolveExceptionRVA = [](void const* input) -> void const* { return input; };
|
||||
#endif
|
||||
|
||||
CatchableTypeArray const* catchables = reinterpret_cast<CatchableTypeArray const*>(resolveExceptionRVA(throwInfo->pCatchableTypeArray));
|
||||
CatchableType const* catchable = catchables->nCatchableTypes ? reinterpret_cast<CatchableType const*>(resolveExceptionRVA(catchables->arrayOfCatchableTypes[0])) : nullptr;
|
||||
|
||||
Reference in New Issue
Block a user