From 21c46f2a1c92b6e56d9f0129b634b44e6e2eca22 Mon Sep 17 00:00:00 2001 From: Slemmie Date: Fri, 20 Aug 2021 06:41:59 +0200 Subject: [PATCH] fix bit shift runtime error --- src/x11_window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/x11_window.c b/src/x11_window.c index a360c15cf..abe3f68fb 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -1271,7 +1271,7 @@ static void processEvent(XEvent *event) // (the server never sends a timestamp of zero) // NOTE: Timestamp difference is compared to handle wrap-around Time diff = event->xkey.time - window->x11.keyPressTimes[keycode]; - if (diff == event->xkey.time || (diff > 0 && diff < (1 << 31))) + if (diff == event->xkey.time || (diff > 0 && diff < (1 << 30))) { if (keycode) _glfwInputKey(window, key, keycode, GLFW_PRESS, mods);