mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-24 20:26:58 +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)
|
static bool IsValid(IntPtr address)
|
||||||
{
|
{
|
||||||
unsafe
|
// See https://www.opengl.org/wiki/Load_OpenGL_Functions
|
||||||
{
|
long a = address.ToInt64();
|
||||||
// See https://www.opengl.org/wiki/Load_OpenGL_Functions
|
bool is_valid = (a < -1 )|| (a > 3);
|
||||||
void* a = address.ToPointer();
|
return is_valid;
|
||||||
return a < (void*)-1 || a > (void*)3;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in a new issue