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

@ -347,13 +347,11 @@ namespace OpenTK.Platform.Windows
} }
static bool IsValid(IntPtr address) static bool IsValid(IntPtr address)
{
unsafe
{ {
// See https://www.opengl.org/wiki/Load_OpenGL_Functions // See https://www.opengl.org/wiki/Load_OpenGL_Functions
void* a = address.ToPointer(); long a = address.ToInt64();
return a < (void*)-1 || a > (void*)3; bool is_valid = (a < -1 )|| (a > 3);
} return is_valid;
} }
#endregion #endregion