mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 18:18:18 +00:00
Fix keyboard segfault
This commit is contained in:
parent
10d6f69d32
commit
8e3550f9c6
|
@ -177,8 +177,8 @@ int CInput::Update()
|
|||
|
||||
AddEvent(Code, 0, 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// handle keys
|
||||
case SDL_KEYDOWN:
|
||||
if(Event.key.keysym.sym == KEY_UNKNOWN)
|
||||
|
@ -234,7 +234,7 @@ int CInput::Update()
|
|||
}
|
||||
|
||||
//
|
||||
if(Key != -1)
|
||||
if(Key >= 0 && Key < 1024)
|
||||
{
|
||||
m_aInputCount[m_InputCurrent][Key].m_Presses++;
|
||||
if(Action == IInput::FLAG_PRESS)
|
||||
|
|
Loading…
Reference in a new issue