Avoid potential 31-bit shift of signed 32-bit value

This commit is contained in:
Paul Cornett
2019-02-17 22:22:08 -08:00
parent 0cb9231720
commit 123b96e214

View File

@@ -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;
}