瀏覽代碼

Removed check for invalid user, added error setting.

Camilla Berglund 13 年之前
父節點
當前提交
ee3304c09a
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      src/opengl.c

+ 4 - 4
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)
     {