FIx overflow
This commit is contained in:
parent
18fd12652d
commit
8380e93e8d
@ -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
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user