mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-24 15:46:57 +00:00
Fixed entry point validity check
This commit is contained in:
parent
fb99c7d7a1
commit
9c7e5201db
|
@ -348,12 +348,10 @@ namespace OpenTK.Platform.Windows
|
|||
|
||||
static bool IsValid(IntPtr address)
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
// See https://www.opengl.org/wiki/Load_OpenGL_Functions
|
||||
void* a = address.ToPointer();
|
||||
return a < (void*)-1 || a > (void*)3;
|
||||
}
|
||||
// See https://www.opengl.org/wiki/Load_OpenGL_Functions
|
||||
long a = address.ToInt64();
|
||||
bool is_valid = (a < -1 )|| (a > 3);
|
||||
return is_valid;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in a new issue