diff options
author | wm4 <wm4@nowhere> | 2014-12-10 18:28:09 +0100 |
---|---|---|
committer | Alessandro Ghedini <alessandro@ghedini.me> | 2014-12-17 20:08:15 +0100 |
commit | 1326d3f0b8ec4a50c24d1b98a66770c97a5af2fa (patch) | |
tree | 30f840b917c643dbdb4aaa474e9acf10325d8b7e | |
parent | b062b54626d066c01161b5dbbd38fa993687bb27 (diff) | |
download | mpv-1326d3f0b8ec4a50c24d1b98a66770c97a5af2fa.tar.bz2 mpv-1326d3f0b8ec4a50c24d1b98a66770c97a5af2fa.tar.xz |
command: fix crash with some forms of script_binding
"script_binding name ..." just crashed it. Oops.
-rw-r--r-- | player/command.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c index 2da13731e6..cec28491d4 100644 --- a/player/command.c +++ b/player/command.c @@ -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; |