summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-25 00:37:31 +0100
committerwm4 <wm4@nowhere>2015-01-25 00:37:31 +0100
commit0e69c1c5af01a499b4699abfdbfa0cf87b4f9142 (patch)
tree05ad51a401462830d9b5a1bcbce02bb8b484aa09 /input
parentd9609c792c6536c8678277c9ae621e4388f2fe17 (diff)
downloadmpv-0e69c1c5af01a499b4699abfdbfa0cf87b4f9142.tar.bz2
mpv-0e69c1c5af01a499b4699abfdbfa0cf87b4f9142.tar.xz
input: fix dangling pointer
Removes undefined behavior that showed up as crap when running with -v.
Diffstat (limited to 'input')
-rw-r--r--input/cmd_parse.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/input/cmd_parse.c b/input/cmd_parse.c
index baeced16f5..44d4c8a82b 100644
--- a/input/cmd_parse.c
+++ b/input/cmd_parse.c
@@ -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;