Fixed entry point validity check

This commit is contained in:
Stefanos A. 2013-11-27 19:36:42 +01:00
parent fb99c7d7a1
commit 9c7e5201db

View file

@ -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