diff --git a/auto/src/glew_head.c b/auto/src/glew_head.c index c24fa57..f233a2e 100644 --- a/auto/src/glew_head.c +++ b/auto/src/glew_head.c @@ -123,7 +123,7 @@ static GLuint _glewStrCLen (const GLubyte* s, GLubyte c) GLuint i=0; if (s == NULL) return 0; while (s[i] != '\0' && s[i] != c) i++; - return s[i] == c ? i : 0; + return (s[i] == '\0' || s[i] == c) ? i : 0; } static GLboolean _glewStrSame (const GLubyte* a, const GLubyte* b, GLuint n)