diff --git a/common/arch/win32/except.cpp b/common/arch/win32/except.cpp index 57f75f058..29782dea6 100644 --- a/common/arch/win32/except.cpp +++ b/common/arch/win32/except.cpp @@ -79,7 +79,12 @@ public: template T *GetProc(const char *const proc) const { - return reinterpret_cast(GetProcAddress(m_h, proc)); + union { + FARPROC gpa; + T *result; + }; + gpa = GetProcAddress(m_h, proc); + return result; } };