summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.si>2020-04-18 22:41:32 +0200
committerTimotej Lazar <timotej.lazar@araneo.si>2020-04-23 18:39:20 +0200
commitecfbee98c5743a6f4926ec51c3fdbdf478966acb (patch)
tree02839c6803ba2363b6e894f4f2ecbf7e956b941f
parent152e6d7f2603eb8c9a3fce99955ee82969049e0a (diff)
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.
-rw-r--r--src/avp/win95/frontend/avp_menus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/avp/win95/frontend/avp_menus.c b/src/avp/win95/frontend/avp_menus.c
index 4c654b3..63a3544 100644
--- a/src/avp/win95/frontend/avp_menus.c
+++ b/src/avp/win95/frontend/avp_menus.c
@@ -2270,7 +2270,7 @@ static void ActUponUsersInput(void)
signed int key,selectedKey=-1;
// 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) &&
// !(key >= KEY_F1 && key <= KEY_F12) &&