From ee3304c09a1c5ffb39a7ce627d9bc0801e68c710 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 2 Aug 2012 15:29:13 +0200 Subject: [PATCH] Removed check for invalid user, added error setting. --- src/opengl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/opengl.c b/src/opengl.c index 8c28fec9..7c324acb 100644 --- a/src/opengl.c +++ b/src/opengl.c @@ -589,7 +589,6 @@ GLFWAPI int glfwExtensionSupported(const char* extension) { const GLubyte* extensions; _GLFWwindow* window; - GLubyte* where; GLint count; int i; @@ -606,10 +605,11 @@ GLFWAPI int glfwExtensionSupported(const char* extension) return GL_FALSE; } - // Extension names should not have spaces - where = (GLubyte*) strchr(extension, ' '); - if (where || *extension == '\0') + if (extension == NULL || *extension == '\0') + { + _glfwSetError(GLFW_INVALID_VALUE, NULL); return GL_FALSE; + } if (window->glMajor < 3) {