From 1ac08b3bd2005cfb3ae45f04494e28b0aa70c684 Mon Sep 17 00:00:00 2001 From: Taylor Richards Date: Fri, 11 Sep 2015 22:44:54 -0400 Subject: [PATCH] fix OOB scancode-keycode lookups in hotkey ui --- src/mission/missionhotkey.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mission/missionhotkey.cpp b/src/mission/missionhotkey.cpp index cc4f44f..26e61ab 100644 --- a/src/mission/missionhotkey.cpp +++ b/src/mission/missionhotkey.cpp @@ -1366,7 +1366,7 @@ void mission_hotkey_do_frame(float frametime) // draw the big "F10" in the little box gr_set_font(FONT2); gr_set_color_fast(&Color_text_normal); - SDL_strlcpy(buf, Scan_code_text[Key_sets[Cur_hotkey]], SDL_arraysize(buf)); + SDL_strlcpy(buf, Scan_code_text[SDL_GetScancodeFromKey(Key_sets[Cur_hotkey])], SDL_arraysize(buf)); gr_get_string_size(&w, &h, buf); gr_printf(Hotkey_function_name_coords[gr_screen.res][0] + (Hotkey_function_name_coords[gr_screen.res][2] - w) / 2, Hotkey_function_name_coords[gr_screen.res][1], buf); @@ -1440,7 +1440,7 @@ void mission_hotkey_do_frame(float frametime) if (hotkeys) { for (i=0; i