Browse Source

Fix function return value when uninitialized

Camilla Löwy 1 năm trước cách đây
mục cha
commit
f74ff2aa10
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/input.c

+ 1 - 1
src/input.c

@@ -721,7 +721,7 @@ GLFWAPI const char* glfwGetKeyName(int key, int scancode)
 
 GLFWAPI int glfwGetKeyScancode(int key)
 {
-    _GLFW_REQUIRE_INIT_OR_RETURN(-1);
+    _GLFW_REQUIRE_INIT_OR_RETURN(0);
 
     if (key < GLFW_KEY_SPACE || key > GLFW_KEY_LAST)
     {