mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 20:27:23 +00:00
input: fix dangling pointer
Removes undefined behavior that showed up as crap when running with -v.
This commit is contained in:
parent
d9609c792c
commit
0e69c1c5af
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user