From 5d44d445ef2b13c0a44c49823fc74c97022e47be Mon Sep 17 00:00:00 2001 From: reimar Date: Tue, 30 Oct 2012 18:37:37 +0000 Subject: input: fix off-by-one error Fix off-by-one error in range check. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35302 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: input/input.c This code is already quite different from mplayer-svn, but still the same bug. --- input/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'input/input.c') diff --git a/input/input.c b/input/input.c index f2b601fdbe..c559e2edfa 100644 --- a/input/input.c +++ b/input/input.c @@ -1256,7 +1256,7 @@ static mp_cmd_t *interpret_key(struct input_ctx *ictx, int code) code &= ~KEY_MODIFIER_SHIFT; if (code & MP_KEY_DOWN) { - if (ictx->num_key_down > MP_MAX_KEY_DOWN) { + if (ictx->num_key_down >= MP_MAX_KEY_DOWN) { mp_tmsg(MSGT_INPUT, MSGL_ERR, "Too many key down events " "at the same time\n"); return NULL; -- cgit v1.2.3