summaryrefslogtreecommitdiffstats
path: root/input/cmd_parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'input/cmd_parse.c')
-rw-r--r--input/cmd_parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/input/cmd_parse.c b/input/cmd_parse.c
index fd7e178e73..db44ccaf5e 100644
--- a/input/cmd_parse.c
+++ b/input/cmd_parse.c
@@ -306,7 +306,7 @@ struct mp_cmd *mp_input_parse_cmd_strv(struct mp_log *log, int def_flags,
bstr args[MP_CMD_MAX_ARGS];
int num = 0;
for (; argv[num]; num++) {
- if (num > MP_CMD_MAX_ARGS) {
+ if (num >= MP_CMD_MAX_ARGS) {
mp_err(log, "%s: too many arguments.\n", location);
return NULL;
}