From 123b96e214cf053729d3d1e3871a21a00a05fdd8 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sun, 17 Feb 2019 22:22:08 -0800 Subject: [PATCH] Avoid potential 31-bit shift of signed 32-bit value --- src/unix/joystick.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/joystick.cpp b/src/unix/joystick.cpp index 0e51fd5ca6..6a1df033ac 100644 --- a/src/unix/joystick.cpp +++ b/src/unix/joystick.cpp @@ -270,7 +270,7 @@ int wxJoystick::GetButtonState() const bool wxJoystick::GetButtonState(unsigned id) const { if (m_thread && (id < wxJS_MAX_BUTTONS)) - return (m_thread->m_buttons & (1 << id)) != 0; + return (m_thread->m_buttons & (1u << id)) != 0; return false; }