mirror of https://github.com/mpv-player/mpv
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
.
This commit is contained in:
parent
482009d170
commit
2696148d64
|
@ -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++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue