mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-27 03:16:58 +00:00
allegro/src/keyboard.c: Avoid accessing out of range items in key/_key arrays
This commit is contained in:
parent
ab42d38947
commit
fc58c24da2
@ -492,6 +492,10 @@ void _handle_key_release(int scancode)
|
||||
repeat_scan = -1;
|
||||
}
|
||||
|
||||
ASSERT(scancode < KEY_MAX);
|
||||
if (scancode >= KEY_MAX)
|
||||
return;
|
||||
|
||||
if ((keyboard_driver->poll) || (!keyboard_polled)) {
|
||||
/* process immediately */
|
||||
key[scancode] = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user