mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 03:52:22 +02:00
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 *target = NULL;
|
||||
char space[MAX_CLIENT_NAME];
|
||||
if (name) {
|
||||
if (sep) {
|
||||
snprintf(space, sizeof(space), "%.*s", (int)(sep - name), name);
|
||||
target = space;
|
||||
name = sep + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user