Fix an off-by-one error in key config menu

When checking for user input in the keyboard config menu, a read past
the end of the DebouncedKeyboardInput array returned a nonzero value
on some systems, which prevented setting a valid binding.
This commit is contained in:
Timotej Lazar 2020-04-18 22:41:32 +02:00
parent 152e6d7f26
commit ecfbee98c5

View file

@ -2270,7 +2270,7 @@ static void ActUponUsersInput(void)
signed int key,selectedKey=-1; signed int key,selectedKey=-1;
// see if a valid key has been pressed // see if a valid key has been pressed
for (key = 0 ; key <= MAX_NUMBER_OF_INPUT_KEYS ; key++) for (key = 0 ; key < MAX_NUMBER_OF_INPUT_KEYS ; key++)
{ {
if (!(key == KEY_ESCAPE) && if (!(key == KEY_ESCAPE) &&
// !(key >= KEY_F1 && key <= KEY_F12) && // !(key >= KEY_F1 && key <= KEY_F12) &&