mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-23 07:05:07 +00:00
fixed sizeof bug in glew_post.c
git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@145 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
parent
1d139ae0cb
commit
d6b4c953bc
@ -15,7 +15,7 @@ const GLubyte* glewGetErrorString (GLenum error)
|
|||||||
"GLX 1.2 and up are not supported",
|
"GLX 1.2 and up are not supported",
|
||||||
"unknown error"
|
"unknown error"
|
||||||
};
|
};
|
||||||
if (error > sizeof(_glewErrorString)) error = sizeof(_glewErrorString);
|
if (error > 4) error = 4;
|
||||||
return _glewErrorString[error];
|
return _glewErrorString[error];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ const GLubyte* glewGetString (GLenum name)
|
|||||||
NULL,
|
NULL,
|
||||||
"GLEW_VERSION_STRING"
|
"GLEW_VERSION_STRING"
|
||||||
};
|
};
|
||||||
if (name > sizeof(_glewString)-1) return NULL;
|
if (name > 1) name = 0;
|
||||||
return _glewString[name];
|
return _glewString[name];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user