From 0e69c1c5af01a499b4699abfdbfa0cf87b4f9142 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 25 Jan 2015 00:37:31 +0100 Subject: [PATCH] input: fix dangling pointer Removes undefined behavior that showed up as crap when running with -v. --- input/cmd_parse.c | 1 + 1 file changed, 1 insertion(+) 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;