SDL: Fix possible crash when parsing key modifiers

This commit is contained in:
Connor McLaughlin 2020-04-14 16:41:59 +10:00
parent 1eeb1012aa
commit 193763b4aa
1 changed files with 1 additions and 1 deletions

View File

@ -259,7 +259,7 @@ struct SDLKeyModifierEntry
const char* name;
};
static const std::array<SDLKeyModifierEntry, 5> s_sdl_key_modifiers = {
static const std::array<SDLKeyModifierEntry, 4> s_sdl_key_modifiers = {
{{KMOD_LSHIFT, static_cast<SDL_Keymod>(KMOD_LSHIFT | KMOD_RSHIFT), SDLK_LSHIFT, SDLK_RSHIFT, "Shift"},
{KMOD_LCTRL, static_cast<SDL_Keymod>(KMOD_LCTRL | KMOD_LCTRL), SDLK_LCTRL, SDLK_RCTRL, "Control"},
{KMOD_LALT, static_cast<SDL_Keymod>(KMOD_LALT | KMOD_RALT), SDLK_LALT, SDLK_RALT, "Alt"},