summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c
index cc8b609c50..60fb7447e1 100644
--- a/player/command.c
+++ b/player/command.c
@@ -5757,7 +5757,7 @@ static void cmd_mouse(void *p)
mp_input_set_mouse_pos_artificial(mpctx->input, x, y);
return;
}
- if (button < 0 || button >= 20) {// invalid button
+ if (button < 0 || button >= MP_KEY_MOUSE_BTN_COUNT) {// invalid button
MP_ERR(mpctx, "%d is not a valid mouse button number.\n", button);
cmd->success = false;
return;