mirror of
https://github.com/mpv-player/mpv
synced 2025-02-18 13:47:04 +00:00
command: fix crash with some forms of script_binding
"script_binding name ..." just crashed it. Oops.
This commit is contained in:
parent
b062b54626
commit
1326d3f0b8
@ -4494,7 +4494,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