blob: 185a407b0fb7a9021a854bddc187d90b91b8cd67 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
Make sure strings like 2.0 aren't misdetected as 0.0 or 1.0.
http://bugs.gentoo.org/100374
--- src/pengine/glew.c
+++ src/pengine/glew.c
@@ -5737,13 +5737,13 @@
s = glGetString(GL_VERSION);
if (!s) return GLEW_ERROR_NO_GL_VERSION;
i = _glewStrCLen(s, '.')+1;
- if (s+i-1 == NULL || s+i == NULL || s[i] < '1')
+ if (s+i-1 == NULL || s+i == NULL || (s[0] < '2' && s[i] < '1'))
{
return GLEW_ERROR_GL_VERSION_10_ONLY;
}
else
{
- if (s[i] >= '5')
+ if (s[0] >= '2' || s[i] >= '5')
{
GLEW_VERSION_1_1 = GL_TRUE;
GLEW_VERSION_1_2 = GL_TRUE;
|