diff options
author | wm4 <wm4@nowhere> | 2016-09-10 20:49:10 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-10 20:49:10 +0200 |
commit | fc1c004cd8b869f268e3d8eb3bf605bc39902e99 (patch) | |
tree | f5a56042a5f5460c36acadc7fcb9d6017ca0a548 /options/m_config.c | |
parent | 484328fe04be40807bfcf170383528feeb03451d (diff) | |
download | mpv-fc1c004cd8b869f268e3d8eb3bf605bc39902e99.tar.bz2 mpv-fc1c004cd8b869f268e3d8eb3bf605bc39902e99.tar.xz |
options: fix --list-options after previous commit
Fixes #3509.
Diffstat (limited to 'options/m_config.c')
-rw-r--r-- | options/m_config.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/options/m_config.c b/options/m_config.c index 1f9d334026..6992ca8c25 100644 --- a/options/m_config.c +++ b/options/m_config.c @@ -184,7 +184,8 @@ static int list_options(struct m_config *config, bstr val, bool show_help) snprintf(s, sizeof(s), "%.*s", BSTR_P(val)); if (show_help) mp_info(config->log, "%s", mp_help_text); - m_config_print_option_list(config, s); + if (s[0]) + m_config_print_option_list(config, s); return M_OPT_EXIT; } @@ -776,7 +777,7 @@ static int m_config_parse_option(struct m_config *config, struct bstr name, if (bstr_equals0(name, "h") || bstr_equals0(name, "help")) return list_options(config, param, true); if (bstr_equals0(name, "list-options")) - return list_options(config, (bstr){0}, false); + return list_options(config, bstr0("*"), false); // Option with children are a bit different to parse if (co->opt->type->flags & M_OPT_TYPE_HAS_CHILD) { |