fixed stack corruption in sound code

This commit is contained in:
jeefo 2016-03-12 19:56:09 +03:00
commit a27d39a394
13 changed files with 155 additions and 143 deletions

View file

@ -137,18 +137,18 @@ public:
return m_ptr;
}
template <typename R> R GetFuncAddr (const char *function)
inline void *GetFuncAddr (const char *function)
{
#ifdef PLATFORM_WIN32
return reinterpret_cast <R> (GetProcAddress (GetHandle <HMODULE> (), function));
return reinterpret_cast <void *> (GetProcAddress (static_cast <HMODULE> (m_ptr), function));
#else
return reinterpret_cast <R> (dlsym (m_ptr, function));
return reinterpret_cast <void *> (dlsym (m_ptr, function));
#endif
}
template <typename R> R GetHandle (void)
inline void *GetHandle (void)
{
return (R) m_ptr;
return m_ptr;
}
inline bool IsLoaded (void) const