0
0
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:
wm4 2014-12-10 18:28:09 +01:00
parent f0cdd673a8
commit efd3f6f0d2

View File

@ -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;