summaryrefslogtreecommitdiffstats
path: root/input/input.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2012-10-30 18:37:37 +0000
committerwm4 <wm4@nowhere>2012-10-31 22:41:48 +0100
commit5d44d445ef2b13c0a44c49823fc74c97022e47be (patch)
treeae4797a48c3107fdab8cca1095a4c3ee7a827454 /input/input.c
parent1ad5f3f0a40e1f1df82a2ea10efd8d074825b151 (diff)
downloadmpv-5d44d445ef2b13c0a44c49823fc74c97022e47be.tar.bz2
mpv-5d44d445ef2b13c0a44c49823fc74c97022e47be.tar.xz
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.
Diffstat (limited to 'input/input.c')
-rw-r--r--input/input.c2
1 files changed, 1 insertions, 1 deletions
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;