Fix memory overflow
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12215 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
bebf7f85c9
commit
cf4dd96871
@ -173,9 +173,8 @@ bool GamePadDevice::processAndMapInput(Input::InputType type, const int id,
|
|||||||
|
|
||||||
if (type == Input::IT_STICKMOTION)
|
if (type == Input::IT_STICKMOTION)
|
||||||
{
|
{
|
||||||
if (id >= m_axis_count && id != Input::HAT_H_ID &&
|
// this gamepad doesn't even have that many axes
|
||||||
id != Input::HAT_V_ID)
|
if (id >= m_axis_count) return false;
|
||||||
return false; // this gamepad doesn't even have that many axes
|
|
||||||
|
|
||||||
if (player != NULL)
|
if (player != NULL)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user