summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-25 00:37:31 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-01-26 16:10:24 +0900
commit909c4d771142a7adc6f905f95f4a3d2e66abcc5f (patch)
tree9e105832d305069a587de88c64bde42d63716a29
parent0f83f1e4b33e8a8e7971b15fb2fc8b7c00a14cda (diff)
downloadmpv-909c4d771142a7adc6f905f95f4a3d2e66abcc5f.tar.bz2
mpv-909c4d771142a7adc6f905f95f4a3d2e66abcc5f.tar.xz
input: fix dangling pointer
Removes undefined behavior that showed up as crap when running with -v.
-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;