mirror of https://github.com/mpv-player/mpv
command: fix crash with some forms of script_binding
"script_binding name ..." just crashed it. Oops.
This commit is contained in:
parent
f0cdd673a8
commit
efd3f6f0d2
|
@ -4511,7 +4511,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
||||||
char *sep = strchr(name, '/');
|
char *sep = strchr(name, '/');
|
||||||
char *target = NULL;
|
char *target = NULL;
|
||||||
char space[MAX_CLIENT_NAME];
|
char space[MAX_CLIENT_NAME];
|
||||||
if (name) {
|
if (sep) {
|
||||||
snprintf(space, sizeof(space), "%.*s", (int)(sep - name), name);
|
snprintf(space, sizeof(space), "%.*s", (int)(sep - name), name);
|
||||||
target = space;
|
target = space;
|
||||||
name = sep + 1;
|
name = sep + 1;
|
||||||
|
|
Loading…
Reference in New Issue