diff options
Diffstat (limited to 'input')
-rw-r--r-- | input/input.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/input/input.c b/input/input.c index 8b59501da0..6643747e4d 100644 --- a/input/input.c +++ b/input/input.c @@ -1257,7 +1257,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; @@ -1722,13 +1722,12 @@ static int parse_config(struct input_ctx *ictx, bool builtin, bstr data, static int parse_config_file(struct input_ctx *ictx, char *file) { - struct bstr res = {0}; stream_t *s = open_stream(file, NULL, NULL); if (!s) { mp_msg(MSGT_INPUT, MSGL_V, "Can't open input config file %s.\n", file); return 0; } - res = stream_read_complete(s, NULL, 1000000, 0); + bstr res = stream_read_complete(s, NULL, 1000000, 0); free_stream(s); mp_msg(MSGT_INPUT, MSGL_V, "Parsing input config file %s\n", file); int n_binds = parse_config(ictx, false, res, file); |