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.
This commit is contained in:
reimar 2012-10-30 18:37:37 +00:00 committed by wm4
parent 1ad5f3f0a4
commit 5d44d445ef
1 changed files with 1 additions and 1 deletions

View File

@ -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;