*** empty log message ***

git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@242 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
ikits 2004-02-23 20:35:23 +00:00
parent 7827862e69
commit 87fdce3d1e

View File

@ -62,13 +62,13 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
s = glGetString(GL_VERSION);
if (!s) return GLEW_ERROR_NO_GL_VERSION;
i = _glewStrCLen(s, '.')+1;
if (s+i == NULL || s[i] < '1')
if (s+i-1 == NULL || s+i == NULL || s[i] < '1')
{
return GLEW_ERROR_GL_VERSION_10_ONLY;
}
else
{
if (s[3] >= '5')
if (s[i] >= '5')
{
GLEW_VERSION_1_1 = GL_TRUE;
GLEW_VERSION_1_2 = GL_TRUE;
@ -76,7 +76,7 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
GLEW_VERSION_1_4 = GL_TRUE;
GLEW_VERSION_1_5 = GL_TRUE;
}
if (s[2] == '4')
if (s[i] == '4')
{
GLEW_VERSION_1_1 = GL_TRUE;
GLEW_VERSION_1_2 = GL_TRUE;
@ -84,7 +84,7 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
GLEW_VERSION_1_4 = GL_TRUE;
GLEW_VERSION_1_5 = GL_FALSE;
}
if (s[2] == '3')
if (s[i] == '3')
{
GLEW_VERSION_1_1 = GL_TRUE;
GLEW_VERSION_1_2 = GL_TRUE;
@ -92,7 +92,7 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
GLEW_VERSION_1_4 = GL_FALSE;
GLEW_VERSION_1_5 = GL_FALSE;
}
if (s[2] == '2')
if (s[i] == '2')
{
GLEW_VERSION_1_1 = GL_TRUE;
GLEW_VERSION_1_2 = GL_TRUE;
@ -100,7 +100,7 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
GLEW_VERSION_1_4 = GL_FALSE;
GLEW_VERSION_1_5 = GL_FALSE;
}
if (s[2] < '2')
if (s[i] < '2')
{
GLEW_VERSION_1_1 = GL_TRUE;
GLEW_VERSION_1_2 = GL_FALSE;