SDL: bugfix - no longer crashes with invalid keys in fceux.cfg
This commit is contained in:
parent
236708f9b8
commit
1bb4c8f53e
|
@ -134,6 +134,9 @@ static uint8 keyonce[MKK_COUNT];
|
||||||
static int
|
static int
|
||||||
_keyonly(int a)
|
_keyonly(int a)
|
||||||
{
|
{
|
||||||
|
// check for valid key
|
||||||
|
if(a > 350 || a < 0)
|
||||||
|
return(0);
|
||||||
if(g_keyState[a]) {
|
if(g_keyState[a]) {
|
||||||
if(!keyonce[a]) {
|
if(!keyonce[a]) {
|
||||||
keyonce[a] = 1;
|
keyonce[a] = 1;
|
||||||
|
|
Loading…
Reference in New Issue