From 438cd224d7cf47894870f60327a6a457d00d7331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 18 Jan 2024 21:43:50 +0100 Subject: [PATCH] Fix function return value when uninitialized (cherry picked from commit f74ff2aa10f926cf64ad9c4fd57a05c8004c8192) --- src/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input.c b/src/input.c index 0ae27eef..cbb59455 100644 --- a/src/input.c +++ b/src/input.c @@ -637,7 +637,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) {