From 761975d47b4e8536df837f999642430d19087b79 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 24 Feb 2014 23:02:20 +0100 Subject: command: fix loadfile command This was broken by commit bb6b543812a724. Note that the original pull request was fine, but it was broken by my own stupidity when I was "improving" it. The problem is that the new loadfile argument was not considered optional anymore after my changes. The original pull request did handle this by setting .defval to a dummy value, but I removed that part. Fix it again by introducing a flag that designates that the parameter is optional. (I didn't want to add it to m_option.h, because technically, all options are optional, and it's not possible to have non-optional options.) --- input/cmd_list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'input/cmd_list.c') diff --git a/input/cmd_list.c b/input/cmd_list.c index 982d4f366c..4fd5331631 100644 --- a/input/cmd_list.c +++ b/input/cmd_list.c @@ -122,7 +122,7 @@ const struct mp_cmd_def mp_cmds[] = { ARG_STRING, OARG_CHOICE(0, ({"replace", 0}, {"0", 0}, {"append", 1}, {"1", 1})), - OPT_KEYVALUELIST(ARG(str_list), 0), + OPT_KEYVALUELIST(ARG(str_list), MP_CMD_OPT_ARG), }}, { MP_CMD_LOADLIST, "loadlist", { ARG_STRING, -- cgit v1.2.3