diff --git a/src/drivers/sdl/input.cpp b/src/drivers/sdl/input.cpp index 05f4f41b..8dbd6f9a 100644 --- a/src/drivers/sdl/input.cpp +++ b/src/drivers/sdl/input.cpp @@ -134,6 +134,9 @@ static uint8 keyonce[MKK_COUNT]; static int _keyonly(int a) { + // check for valid key + if(a > 350 || a < 0) + return(0); if(g_keyState[a]) { if(!keyonce[a]) { keyonce[a] = 1;