mirror of
https://github.com/yawut/SDL.git
synced 2026-09-07 16:45:57 -05:00
Add a few keyboard tests; fix missing input validation in SDL_GetKeyFromName
This commit is contained in:
@@ -953,6 +953,9 @@ SDL_GetKeyFromName(const char *name)
|
||||
{
|
||||
SDL_Keycode key;
|
||||
|
||||
/* Check input */
|
||||
if (name == NULL) return SDLK_UNKNOWN;
|
||||
|
||||
/* If it's a single UTF-8 character, then that's the keycode itself */
|
||||
key = *(const unsigned char *)name;
|
||||
if (key >= 0xF0) {
|
||||
|
||||
Reference in New Issue
Block a user