FIx overflow

This commit is contained in:
auria.mg 2018-01-18 18:02:26 -05:00
parent 18fd12652d
commit 8380e93e8d

View File

@ -104,7 +104,8 @@ bool GamePadDevice::isButtonPressed(const int i)
void GamePadDevice::setButtonPressed(const int i, bool isButtonPressed)
{
m_button_pressed[i] = isButtonPressed;
if (i < m_button_pressed.size())
m_button_pressed[i] = isButtonPressed;
} // setButtonPressed
// ----------------------------------------------------------------------------