qnx: fixed potential buffer overflow.

Ryan C. Gordon 2017-07-01 19:52:12 -04:00
parent 22241ed0b0
commit 200f782cab
1 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ handleKeyboardEvent(screen_event_t event)
}
// Skip unrecognized keys.
if ((val < 0) || (val > (sizeof(key_to_sdl) / sizeof(int)))) {
if ((val < 0) || (val >= SDL_TABLESIZE(key_to_sdl))) {
return;
}