From aec952e8dce2bab1f71a11d4b554d58c816fa20f Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 7 Mar 2013 17:12:43 +0100 Subject: [PATCH] Fixed and clarified invalid char tests. --- src/input.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/input.c b/src/input.c index d2c366fa..0d38da4f 100644 --- a/src/input.c +++ b/src/input.c @@ -140,8 +140,10 @@ void _glfwInputKey(_GLFWwindow* window, int key, int action) void _glfwInputChar(_GLFWwindow* window, unsigned int character) { - // Valid Unicode (ISO 10646) character? - if (!((character >= 32 && character <= 126) || character >= 160)) + if (character == -1) + return; + + if (character < 32 || (character > 126 && character < 160)) return; if (window->callbacks.character)