input: fix dangling pointer

Removes undefined behavior that showed up as crap when running with -v.
This commit is contained in:
wm4 2015-01-25 00:37:31 +01:00
parent d9609c792c
commit 0e69c1c5af
1 changed files with 1 additions and 0 deletions

View File

@ -409,6 +409,7 @@ mp_cmd_t *mp_cmd_clone(mp_cmd_t *cmd)
memset(&ret->args[i].v, 0, ret->args[i].type->type->size);
m_option_copy(ret->args[i].type, &ret->args[i].v, &cmd->args[i].v);
}
ret->original = bstrdup(ret, cmd->original);
if (cmd->id == MP_CMD_COMMAND_LIST) {
struct mp_cmd *prev = NULL;