From 2696148d64364b40e7b0d1d3de017d6afce4b43d Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 1 Nov 2013 12:27:04 +0100 Subject: options: fix positional suboption asrguments E.g. "-vf scale=848:480" set the w argument twice, instead of setting w and then h. This was caused by accidental shadowing of a local variable. Regression since probably 4cd143e. --- mpvcore/m_config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mpvcore/m_config.c') diff --git a/mpvcore/m_config.c b/mpvcore/m_config.c index 463fc8e6f7..a938eb843b 100644 --- a/mpvcore/m_config.c +++ b/mpvcore/m_config.c @@ -461,13 +461,13 @@ struct m_config_option *m_config_get_co(const struct m_config *config, return NULL; } -const char *m_config_get_positional_option(const struct m_config *config, int n) +const char *m_config_get_positional_option(const struct m_config *config, int p) { int pos = 0; for (int n = 0; n < config->num_opts; n++) { struct m_config_option *co = &config->opts[n]; if (!co->is_generated) { - if (pos == n) + if (pos == p) return co->name; pos++; } -- cgit v1.2.3